Skip to content

Conversation

@AleeyahAnjola
Copy link
Collaborator

@AleeyahAnjola AleeyahAnjola commented Dec 4, 2022

Issue

As an applicant, I should be able to see my personal details

What has changed

Created an Applicant Repository, Service and Controller to implement my methods for an applicant to view his/her details
Used CurrentUserUtil.getCurrentUser() method to get the details of the current user

Link to linear ticket: https://linear.app/team-hydraulics/issue/BAC-120/applicant-view-personal-details

@RequestParam(value = "pageNo", defaultValue = DEFAULT_PAGE_NUMBER, required = false) int pageNo,
@RequestParam(value = "pageSize", defaultValue = DEFAULT_PAGE_SIZE, required = false) int pageSize,
@RequestParam(value = "sortBy", defaultValue = DEFAULT_SORT_BY, required = false) String sortBy,
@RequestParam(value = "sortDir", defaultValue = DEFAULT_SORT_DIRECTION, required = false) String sortDir) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the id in the url, we do not need to specify the id of an existing user, instead we fetch the user from the security context. so use the security context to get the id of the user and pass that into the service method

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've implemented that and it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants