Skip to content

Commit

Permalink
Merge pull request #29 from Zatch-Team/Feature/User
Browse files Browse the repository at this point in the history
#3 fix : 회원 닉네임 수정 & 마이페이지 & 동네 설정 RES 응답 수정
  • Loading branch information
Suanna01 committed Apr 18, 2023
2 parents ede688e + 7de45c7 commit ece551e
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/main/java/com/zatch/zatchserver/controller/UserController.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,13 @@ public ResponseEntity logout(HttpServletRequest request, HttpServletResponse res
}
}

@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success", response = PatchUserNicknameResDto.class,
examples = @Example(@ExampleProperty(value = "{'property1': 'value1', 'property2': 'value2'}", mediaType = MediaType.APPLICATION_JSON_VALUE)))
})
@PatchMapping("/{userId}/nickname")
@ApiOperation(value = "회원 닉네임 수정", notes = "회원 닉네임 수정 API")
public ResponseEntity patchNickname(@PathVariable("userId") Long userId
, @RequestBody PatchUserNicknameReqDto pathUserNicknameReqDto) {
public ResponseEntity patchNickname(@PathVariable("userId") Long userId , @RequestBody PatchUserNicknameReqDto pathUserNicknameReqDto) {
try {
String newNickname = pathUserNicknameReqDto.getNewNickname();
Long idOfModifiedUser = userId;
Expand All @@ -132,6 +135,10 @@ public ResponseEntity getProfile(@PathVariable("userId") Long userId) {
}
}

@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success", response = PostUserAddressReqDto.class,
examples = @Example(@ExampleProperty(value = "{'property1': 'value1', 'property2': 'value2'}", mediaType = MediaType.APPLICATION_JSON_VALUE)))
})
@PostMapping("/{userId}/address")
@ApiOperation(value = "회원 동네", notes = "회원 동네 API")
public ResponseEntity postAddress(@PathVariable("userId") Long userId, @RequestBody PostUserAddressReqDto postUserAddressReqDTO) {
Expand All @@ -146,6 +153,10 @@ public ResponseEntity postAddress(@PathVariable("userId") Long userId, @RequestB
}
}

@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success", response = GetMypageResDto.class,
examples = @Example(@ExampleProperty(value = "{'property1': 'value1', 'property2': 'value2'}", mediaType = MediaType.APPLICATION_JSON_VALUE)))
})
@GetMapping("/{userId}/mypage")
@ApiOperation(value = "회원 마이페이지", notes = "회원 마이페이지 API")
public ResponseEntity getMypage(@PathVariable("userId") Long userId) {
Expand Down

0 comments on commit ece551e

Please sign in to comment.