Skip to content

Commit

Permalink
[refactor #153] ResponseEntity<?>를 ResponseEntity<Void>로 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jorippppong committed Sep 24, 2024
1 parent 8168c60 commit ac424a4
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public ResponseEntity<PostResponseDto.CommentSuccessResponseDto> createGuestBook
}

@PostMapping("/{guestbook_id}/comments/{comment_id}/notification")
public ResponseEntity<?> sendGuestBookNotification(
public ResponseEntity<Void> sendGuestBookNotification(
@PathVariable("guestbook_id") Long guestbookId,
@PathVariable("comment_id") Long commentId
){
Expand All @@ -70,7 +70,7 @@ public ResponseEntity<?> sendGuestBookNotification(
@ApiResponse(responseCode = "204")
})
@PutMapping("/comments/{comment_id}")
public ResponseEntity<?> modifyGuestBookComment(
public ResponseEntity<Void> modifyGuestBookComment(
@PathVariable("comment_id") Long commentId,
@RequestBody CommentRequestDto.ModifyComment dto
){
Expand All @@ -85,7 +85,7 @@ public ResponseEntity<?> modifyGuestBookComment(
@ApiResponse(responseCode = "204")
})
@DeleteMapping("/comments/{comment_id}")
public ResponseEntity<?> deleteGuestBookComment(
public ResponseEntity<Void> deleteGuestBookComment(
@PathVariable("comment_id") Long commentId
){
Member member = securityUtil.getUser();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public GuestBookResponseDto.DetailGuestBookDto getDetailGuestBook(
@ApiResponse(responseCode = "204")
})
@PatchMapping("/{guestbook_id}")
public ResponseEntity<?> modifyGuestBook(
public ResponseEntity<Void> modifyGuestBook(
@PathVariable("guestbook_id") Long guestbookId,
@RequestPart GuestBookRequestDto.ModifyGuestBookDto data,
@RequestPart(required = false) List<MultipartFile> images
Expand All @@ -102,7 +102,7 @@ public ResponseEntity<?> modifyGuestBook(
@ApiResponse(responseCode = "204")
})
@DeleteMapping("/{guestbook_id}")
public ResponseEntity<?> deleteGuestBook(
public ResponseEntity<Void> deleteGuestBook(
@PathVariable("guestbook_id") Long guestbookId
){
Member member = securityUtil.getUser();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public ResponseEntity<NotificationResponseDto> getAllNotification(
@ApiResponse(responseCode = "204")
})
@PatchMapping()
public ResponseEntity<?> readAllNotification(){
public ResponseEntity<Void> readAllNotification(){
Member member = securityUtil.getUser();
notificationService.readAllNotification(member);
return ResponseEntity.noContent().build();
Expand All @@ -47,7 +47,7 @@ public ResponseEntity<?> readAllNotification(){
@ApiResponse(responseCode = "204")
})
@PatchMapping("/{notificationId}")
public ResponseEntity<?> readNotification(
public ResponseEntity<Void> readNotification(
@PathVariable Long notificationId
){
Member member = securityUtil.getUser();
Expand All @@ -60,7 +60,7 @@ public ResponseEntity<?> readNotification(
@ApiResponse(responseCode = "204")
})
@DeleteMapping("/{notificationId}")
public ResponseEntity<?> deleteNotification(
public ResponseEntity<Void> deleteNotification(
@PathVariable Long notificationId
){
Member member = securityUtil.getUser();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ public CommonResponseDto.PostResponseDto likeToRally(@PathVariable("rally_id")Lo

// 랠리 FCM 구독
@PostMapping("/{rally_id}/subscribe")
public ResponseEntity<?> subscribeRally(@PathVariable("rally_id") Long rallyId){
public ResponseEntity<Void> subscribeRally(@PathVariable("rally_id") Long rallyId){
Member member = securityUtil.getUser();
pilgrimageCommandService.subscribeRally(rallyId, member);
return ResponseEntity.ok().build();
}

// 랠리 FCM 구독 취소
@DeleteMapping("/{rally_id}/unsubscribe")
public ResponseEntity<?> unsubscribeRally(@PathVariable("rally_id") Long rallyId){
public ResponseEntity<Void> unsubscribeRally(@PathVariable("rally_id") Long rallyId){
Member member = securityUtil.getUser();
pilgrimageCommandService.unsubscribeRally(rallyId, member);
return ResponseEntity.noContent().build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public ResponseEntity<CommentSuccessResponseDto> createPostComment(
}

@PostMapping("/{post_id}/comments/{comment_id}/notification")
public ResponseEntity<?> sendPostNotification(
public ResponseEntity<Void> sendPostNotification(
@PathVariable("post_id") long postId,
@PathVariable("comment_id") long commentId
){
Expand All @@ -72,7 +72,7 @@ public ResponseEntity<?> sendPostNotification(
@ApiResponse(responseCode = "204")
})
@PutMapping("/comments/{comment_id}")
public ResponseEntity<?> modifyPostComment(
public ResponseEntity<Void> modifyPostComment(
@PathVariable("comment_id") long commentId,
@RequestBody CommentRequestDto.ModifyComment dto
){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public ResponseEntity<PostResponseDto.PostIdResponseDto> createPost(
@ApiResponse(responseCode = "204")
})
@DeleteMapping("/{post_id}")
public ResponseEntity<?> deletePost(
public ResponseEntity<Void> deletePost(
@PathVariable("post_id") long postId
){
Member member = securityUtil.getUser();
Expand All @@ -122,7 +122,7 @@ public ResponseEntity<PostResponseDto.LikeSuccessResponseDto> modifyPostLike(
@ApiResponse(responseCode = "204")
})
@PatchMapping("/{post_id}")
public ResponseEntity<?> modifyPost(
public ResponseEntity<Void> modifyPost(
@PathVariable("post_id") Long postId,
@RequestPart PostRequestDto data,
@RequestPart(required = false) List<MultipartFile> images
Expand Down

0 comments on commit ac424a4

Please sign in to comment.