Skip to content

Commit

Permalink
refactor: API Path 부에 '/' 추가 #2
Browse files Browse the repository at this point in the history
  • Loading branch information
PgmJun committed Apr 21, 2023
1 parent 81dad06 commit 6c18b07
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public ResponseEntity<?> saveUser(@RequestBody UserRequestDto userRequestDto) {
return new ResponseEntity("유저 저장 완료", HttpStatus.OK);
}

@GetMapping("{userId}")
@GetMapping("/{userId}")
public ResponseEntity<?> findUser(@PathVariable Long userId) {
Optional<User> findUser = userService.findUserById(userId);

Expand All @@ -39,6 +39,7 @@ public ResponseEntity<?> updateUser(@PathVariable Long userId, @RequestBody User




private ResponseEntity<?> generateUserResponseEntity(Optional<User> user, Long userId) {
return (user.isEmpty()) ?
new ResponseEntity<>(userId + "번 유저에 대한 정보가 존재하지 않습니다.", HttpStatus.NO_CONTENT) :
Expand Down

0 comments on commit 6c18b07

Please sign in to comment.