Skip to content

Commit

Permalink
CCMSPUI-376: Revert UserController
Browse files Browse the repository at this point in the history
Signed-off-by: Jamie Briggs <jamie.briggs@digital.justice.gov.uk>
  • Loading branch information
JamieBriggs-MoJ committed Dec 9, 2024
1 parent 193b6a6 commit ef3e97c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public class UserController implements UsersApi {
*/
@Override
public ResponseEntity<UserDetail> getUser(String loginId) {
return userService.getUser(loginId).map(ResponseEntity::ok)
return userService.getUser(loginId)
.map(ResponseEntity::ok)
.orElse(ResponseEntity.notFound().build());
}

Expand All @@ -48,5 +49,4 @@ public ResponseEntity<UserDetail> getUser(String loginId) {
public ResponseEntity<UserDetails> getUsers(Integer providerId, Pageable pageable) {
return ResponseEntity.ok(userService.getUsers(providerId, pageable));
}

}

0 comments on commit ef3e97c

Please sign in to comment.