Skip to content

Commit

Permalink
Merge pull request #11 from cloud-native-toolkit/patch/user-solutions
Browse files Browse the repository at this point in the history
User solution fetches only private solutions
  • Loading branch information
NoeSamaille authored Apr 15, 2022
2 parents 434a5a7 + 87097e9 commit 3a85f6f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/controllers/user.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,13 @@ export class UserController {
async findUserSolutionsById(
@param.path.string('id') email: string,
): Promise<Solution[]> {
const publicFilter = {
where: {
public: false
}
}
await this.userRepository.findById(email);
return this.userRepository.solutions(email).find();
return this.userRepository.solutions(email).find(publicFilter);
}

@patch('/users/{id}')
Expand Down

0 comments on commit 3a85f6f

Please sign in to comment.