-
Notifications
You must be signed in to change notification settings - Fork 2
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
Replaced attendance object with transaction #64
Conversation
@@ -76,11 +77,11 @@ public ResponseEntity<List<Event>> getEventsByBranch(@PathVariable Branch branch | |||
|
|||
@GetMapping("/user/{userId}") | |||
@PreAuthorize(Constants.HAS_ROLE_MEMBER_AND_ABOVE) | |||
public ResponseEntity<List<Event>> getUserEventsByRole(@PathVariable Integer userId, @RequestParam("role") @Nullable String role) { |
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.
Wouldnt it be better to get emai from jwt instead of passing user id in url ? @harshjohar 🤔
Rest 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.
Yeah, actually better idea
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.
removed userId from path
if (eventRole == null){ | ||
return ResponseEntity.ok(eventService.getUserEventsByRole(userId, EventRole.PARTICIPANT)); |
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.
According to #51 if event role is not provided all events should be returned
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.
Now returning all events
…into feat-attend-to-trans
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
resolves #60