We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
say you have a new entity you want to list.. wich will be the best way of filtering by logged user id? interceptor would be the best choice right?
The text was updated successfully, but these errors were encountered:
Hi @mso1985, You can get logged in user by @authuser decorator and pass to your service function as options (options always need to be Partial)
@Get('users') @Roles(RoleType.USER) @HttpCode(HttpStatus.OK) async admin(@AuthUser() currentUser: UserEntity) { const userEntities = await this.yourService.getUsers({parentId: currentUser.id}); return userEntities.toDtos(); }
Sorry, something went wrong.
Great! this boilerplate is proving itself
No branches or pull requests
say you have a new entity you want to list.. wich will be the best way of filtering by logged user id? interceptor would be the best choice right?
The text was updated successfully, but these errors were encountered: