-
Notifications
You must be signed in to change notification settings - Fork 0
Added api route to get ssf contact for pantry #8
New issue
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the route supposed to be /api/users/pantries/{pantryId}/ssf-contact
? This feels a bit confusing to me having both users
and pantries
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me, the request does not work unless I remove both the interceptor decorator from the controller and the AuthGuard decorator from the new controller function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that the path is confusing. Maybe something like users/ssf-contact/{pantryId}?
@@ -27,4 +27,10 @@ export class UsersController { | |||
removeUser(@Param('id') id: string) { | |||
return this.usersService.remove(parseInt(id)); | |||
} | |||
|
|||
@UseGuards(AuthGuard('jwt')) | |||
@Get('/pantries/:pantryId/ssf-contact') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would make more sense to put this route under a pantries controller so that the path is just /pantries/{pantryId}/ssf-contact instead of with the users/ prefix? I know that this is getting a user in the end but the representative is kind of like an attribute of a specific pantry that we query for
508d3b8
to
fbd25a3
Compare
ℹ️ Issue
Get SSF Contact Name for Pantry
📝 Description