Skip to content

Commit 2ec5c62

Browse files
authored
Post 좋아요/싫어요 DTO 분리 (#218)
1 parent 8652aab commit 2ec5c62

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

back/src/main/java/com/back/domain/post/post/controller/PostController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ public RsData<PostLikedResponse> likePost(@PathVariable Long post_id) {
108108

109109
@Operation(summary = "게시글 싫어요")
110110
@PostMapping("/{post_id}/disliked")
111-
public RsData<PostLikedResponse> disLikePost(@PathVariable Long post_id) {
111+
public RsData<PostDisLikedResponse> disLikePost(@PathVariable Long post_id) {
112112
postLikeService.disLikePost(post_id);
113113

114114
int likeCount = postLikeService.getDisLikeCount(post_id);
115-
PostLikedResponse postLikedResponse = new PostLikedResponse(likeCount);
115+
PostDisLikedResponse postdisLikedResponse = new PostDisLikedResponse(likeCount);
116116

117-
return new RsData<>("200", "게시글 싫어요 성공", postLikedResponse);
117+
return new RsData<>("200", "게시글 싫어요 성공", postdisLikedResponse);
118118
}
119119

120120

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package com.back.domain.post.post.dto;
2+
3+
public record PostDisLikedResponse(int disLikeCount) {
4+
}

0 commit comments

Comments
 (0)