From 9f9875d340b1cdf3ef94925285606053e5356885 Mon Sep 17 00:00:00 2001 From: yeonjy Date: Tue, 30 Apr 2024 16:43:03 +0900 Subject: [PATCH 1/8] remove: image url update X --- .../rollthedice/backend/domain/member/dto/MemberUpdateDto.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/backend/core/src/main/java/com/rollthedice/backend/domain/member/dto/MemberUpdateDto.java b/backend/core/src/main/java/com/rollthedice/backend/domain/member/dto/MemberUpdateDto.java index 8e0cd929..aac6c38c 100644 --- a/backend/core/src/main/java/com/rollthedice/backend/domain/member/dto/MemberUpdateDto.java +++ b/backend/core/src/main/java/com/rollthedice/backend/domain/member/dto/MemberUpdateDto.java @@ -13,14 +13,11 @@ public class MemberUpdateDto { @Schema(description = "변경할 닉네임") private String nickname; - @Schema(description = "변경할 이미지 S3 Url") - private String imageUrl; public MemberServiceDto toServiceDto(String email) { return MemberServiceDto.builder() .email(email) .nickname(this.nickname) - .imageUrl(this.imageUrl) .build(); } } From df4ee06953f60bc8f4d68aa5b2d558666f5de183 Mon Sep 17 00:00:00 2001 From: yeonjy Date: Tue, 30 Apr 2024 16:43:34 +0900 Subject: [PATCH 2/8] test: image url update X --- .../com/rollthedice/backend/domain/auth/AuthTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/core/src/test/java/com/rollthedice/backend/domain/auth/AuthTest.java b/backend/core/src/test/java/com/rollthedice/backend/domain/auth/AuthTest.java index 1df44ec6..25085d20 100644 --- a/backend/core/src/test/java/com/rollthedice/backend/domain/auth/AuthTest.java +++ b/backend/core/src/test/java/com/rollthedice/backend/domain/auth/AuthTest.java @@ -35,7 +35,7 @@ public class AuthTest extends LoginTest { public void accessToken_로그인_성공() throws Exception { // when final ResultActions perform = mockMvc.perform(post("/members").contentType(MediaType.APPLICATION_JSON) - .content(toRequestBody(new MemberUpdateDto("yeonjy", "imageUrl2"))) + .content(toRequestBody(new MemberUpdateDto("yeonjy"))) .header("Authorization", "Bearer " + accessToken)); // then @@ -55,7 +55,7 @@ public class AuthTest extends LoginTest { // when final ResultActions perform = mockMvc.perform(post("/members").contentType(MediaType.APPLICATION_JSON) - .content(toRequestBody(new MemberUpdateDto("yeonjy", "imageUrl2"))) + .content(toRequestBody(new MemberUpdateDto("yeonjy"))) .header("Authorization", "Bearer " + accessToken)); // then @@ -78,7 +78,7 @@ public class AuthTest extends LoginTest { // when final ResultActions perform = mockMvc.perform(post("/members").contentType(MediaType.APPLICATION_JSON) - .content(toRequestBody(new MemberUpdateDto("yeonjy", "imageUrl2"))) + .content(toRequestBody(new MemberUpdateDto("yeonjy"))) .header("Authorization-refresh", "Bearer " + refreshToken)).andDo(print()); // then @@ -99,7 +99,7 @@ public class AuthTest extends LoginTest { // when final ResultActions perform = mockMvc.perform(post("/members").contentType(MediaType.APPLICATION_JSON) - .content(toRequestBody(new MemberUpdateDto("yeonjy", "imageUrl2"))) + .content(toRequestBody(new MemberUpdateDto("yeonjy"))) .header("Authorization-refresh", "Bearer " + refreshToken)).andDo(print()); // then From 9e221bea7af860170712d25e9b5b17d444d5b1da Mon Sep 17 00:00:00 2001 From: yeonjy Date: Tue, 30 Apr 2024 17:49:28 +0900 Subject: [PATCH 3/8] =?UTF-8?q?rename:=20=ED=8C=A8=ED=82=A4=EC=A7=80?= =?UTF-8?q?=EB=AA=85=20controller=20->=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/bookmark/{controller => api}/BookmarkController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename backend/core/src/main/java/com/rollthedice/backend/domain/bookmark/{controller => api}/BookmarkController.java (94%) diff --git a/backend/core/src/main/java/com/rollthedice/backend/domain/bookmark/controller/BookmarkController.java b/backend/core/src/main/java/com/rollthedice/backend/domain/bookmark/api/BookmarkController.java similarity index 94% rename from backend/core/src/main/java/com/rollthedice/backend/domain/bookmark/controller/BookmarkController.java rename to backend/core/src/main/java/com/rollthedice/backend/domain/bookmark/api/BookmarkController.java index 6797e57f..2b44ed29 100644 --- a/backend/core/src/main/java/com/rollthedice/backend/domain/bookmark/controller/BookmarkController.java +++ b/backend/core/src/main/java/com/rollthedice/backend/domain/bookmark/api/BookmarkController.java @@ -1,4 +1,4 @@ -package com.rollthedice.backend.domain.bookmark.controller; +package com.rollthedice.backend.domain.bookmark.api; import com.rollthedice.backend.domain.bookmark.service.BookmarkService; import com.rollthedice.backend.domain.news.dto.response.NewsResponse; From 79f8b8bdac23b0a3b4c4edf5c6ba8ca949c07490 Mon Sep 17 00:00:00 2001 From: yeonjy Date: Tue, 30 Apr 2024 17:51:06 +0900 Subject: [PATCH 4/8] =?UTF-8?q?feat:=20Bookmark=20API=20swagger=20?= =?UTF-8?q?=EC=84=A4=EB=AA=85=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/bookmark/api/BookmarkApi.java | 58 +++++++++++++++++++ .../bookmark/api/BookmarkController.java | 5 +- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 backend/core/src/main/java/com/rollthedice/backend/domain/bookmark/api/BookmarkApi.java diff --git a/backend/core/src/main/java/com/rollthedice/backend/domain/bookmark/api/BookmarkApi.java b/backend/core/src/main/java/com/rollthedice/backend/domain/bookmark/api/BookmarkApi.java new file mode 100644 index 00000000..ca710d00 --- /dev/null +++ b/backend/core/src/main/java/com/rollthedice/backend/domain/bookmark/api/BookmarkApi.java @@ -0,0 +1,58 @@ +package com.rollthedice.backend.domain.bookmark.api; + +import com.rollthedice.backend.domain.news.dto.response.NewsResponse; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import org.springframework.data.domain.Pageable; + +import java.util.List; + +public interface BookmarkApi { + @Operation( + summary = "북마크 조회", + description = "회원이 북마크한 뉴스를 페이지로 나누어 조회합니다.", + security = {@SecurityRequirement(name = "access_token")}, + tags = {"bookmark"} + ) + @ApiResponse( + responseCode = "200", + description = "OK" + ) + List getBookmarked( + Pageable pageable + ); + + @Operation( + summary = "북마크 저장", + description = "뉴스에 대하여 북마크로 저장합니다.", + security = {@SecurityRequirement(name = "access_token")}, + tags = {"bookmark"} + ) + @ApiResponse( + responseCode = "201", + description = "Created" + ) + void saveBookmark( + @Parameter(in = ParameterIn.PATH, description = "뉴스 ID", required = true) + Long newsId + ); + + @Operation( + summary = "북마크 삭제", + description = "저장된 북마크를 해제합니다.", + security = {@SecurityRequirement(name = "access_token")}, + tags = {"bookmark"} + ) + @ApiResponse( + responseCode = "204", + description = "No Content" + ) + void deleteBookmark( + @Parameter(in = ParameterIn.PATH, description = "뉴스 ID", required = true) + Long newsId + ); + +} diff --git a/backend/core/src/main/java/com/rollthedice/backend/domain/bookmark/api/BookmarkController.java b/backend/core/src/main/java/com/rollthedice/backend/domain/bookmark/api/BookmarkController.java index 2b44ed29..6d4ad706 100644 --- a/backend/core/src/main/java/com/rollthedice/backend/domain/bookmark/api/BookmarkController.java +++ b/backend/core/src/main/java/com/rollthedice/backend/domain/bookmark/api/BookmarkController.java @@ -12,23 +12,26 @@ @RestController @RequiredArgsConstructor @RequestMapping("bookmarks") -public class BookmarkController { +public class BookmarkController implements BookmarkApi { private final BookmarkService bookmarkService; @ResponseStatus(HttpStatus.OK) @GetMapping("") + @Override public List getBookmarked(final Pageable pageable) { return bookmarkService.getBookmarkedNews(pageable); } @ResponseStatus(HttpStatus.CREATED) @PostMapping("/{newsId}") + @Override public void saveBookmark(@PathVariable final Long newsId) { bookmarkService.saveBookmark(newsId); } @ResponseStatus(HttpStatus.NO_CONTENT) @DeleteMapping("/{newsId}") + @Override public void deleteBookmark(@PathVariable final Long newsId) { bookmarkService.deleteBookmark(newsId); } From d692699a02413201e975e528f8ccf3c898e8e21e Mon Sep 17 00:00:00 2001 From: yeonjy Date: Wed, 1 May 2024 03:28:27 +0900 Subject: [PATCH 5/8] =?UTF-8?q?feat:=20Debate=20=EA=B4=80=EB=A0=A8=20API?= =?UTF-8?q?=20swagger=20=EC=84=A4=EB=AA=85=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/domain/debate/api/DebateApi.java | 109 ++++++++++++++++++ .../{controller => api}/DebateController.java | 10 +- 2 files changed, 117 insertions(+), 2 deletions(-) create mode 100644 backend/core/src/main/java/com/rollthedice/backend/domain/debate/api/DebateApi.java rename backend/core/src/main/java/com/rollthedice/backend/domain/debate/{controller => api}/DebateController.java (92%) diff --git a/backend/core/src/main/java/com/rollthedice/backend/domain/debate/api/DebateApi.java b/backend/core/src/main/java/com/rollthedice/backend/domain/debate/api/DebateApi.java new file mode 100644 index 00000000..548f4f4c --- /dev/null +++ b/backend/core/src/main/java/com/rollthedice/backend/domain/debate/api/DebateApi.java @@ -0,0 +1,109 @@ +package com.rollthedice.backend.domain.debate.api; + +import com.rollthedice.backend.domain.debate.dto.request.DebateMessageRequest; +import com.rollthedice.backend.domain.debate.dto.request.DebateRoomRequest; +import com.rollthedice.backend.domain.debate.dto.response.DebateMessageResponse; +import com.rollthedice.backend.domain.debate.dto.response.DebateRoomResponse; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import org.springframework.data.domain.Pageable; +import org.springframework.web.bind.annotation.RequestBody; + +import java.util.List; + + +public interface DebateApi { + + @Operation( + summary = "토론방 생성", + description = "주제가 선택된 토론방을 생성합니다.", + security = {@SecurityRequirement(name = "access_token")}, + tags = {"debate_room"} + ) + @ApiResponse( + responseCode = "201", + description = "Created" + ) + void saveDebateRoom(@RequestBody DebateRoomRequest request); + + @Operation( + summary = "토론방 전체 조회", + description = "회원의 토론방을 페이지로 나누어 조회합니다.", + security = {@SecurityRequirement(name = "access_token")}, + tags = {"debate_room"} + ) + @ApiResponse( + responseCode = "200", + description = "OK" + ) + List getDebateRooms(Pageable pageable); + + @Operation( + summary = "토론방 삭제", + description = "토론방을 삭제합니다.", + security = {@SecurityRequirement(name = "access_token")}, + tags = {"debate_room"} + ) + @ApiResponse( + responseCode = "204", + description = "No Content" + ) + void deleteDebateRoom(@Parameter(in = ParameterIn.PATH, description = "토론방 ID", required = true) + Long roomId + ); + + @Operation( + summary = "[인간] 토론 메세지 저장", + description = "사용자가 보낸 토론 메세지를 저장합니다.", + security = {@SecurityRequirement(name = "access_token")}, + tags = {"debate_message"} + ) + @ApiResponse( + responseCode = "201", + description = "Created" + ) + void saveHumanDebateMessage( + @Parameter(in = ParameterIn.PATH, description = "토론방 ID", required = true) + Long roomId, + + @RequestBody DebateMessageRequest request + ); + + @Operation( + summary = "[AI] 토론 메세지 저장", + description = "ChatGPT OPENAI가 보낸 토론 메세지를 저장합니다.", + security = {@SecurityRequirement(name = "access_token")}, + tags = {"debate_message"} + ) + @ApiResponse( + responseCode = "201", + description = "Created" + ) + void saveAIDebateMessage( + @Parameter(in = ParameterIn.PATH, description = "토론방 ID", required = true) + Long roomId, + + @RequestBody DebateMessageRequest request + ); + + @Operation( + summary = "토론 메세지 조회", + description = "토론방의 토론 메세지 이력을 조회합니다.", + security = {@SecurityRequirement(name = "access_token")}, + tags = {"debate_message"} + ) + @ApiResponse( + responseCode = "200", + description = "OK" + ) + List getDebateMessages( + @Parameter(in = ParameterIn.PATH, description = "토론방 ID", required = true) + Long roomId + ); + + + +} diff --git a/backend/core/src/main/java/com/rollthedice/backend/domain/debate/controller/DebateController.java b/backend/core/src/main/java/com/rollthedice/backend/domain/debate/api/DebateController.java similarity index 92% rename from backend/core/src/main/java/com/rollthedice/backend/domain/debate/controller/DebateController.java rename to backend/core/src/main/java/com/rollthedice/backend/domain/debate/api/DebateController.java index 090a3114..1191ca7c 100644 --- a/backend/core/src/main/java/com/rollthedice/backend/domain/debate/controller/DebateController.java +++ b/backend/core/src/main/java/com/rollthedice/backend/domain/debate/api/DebateController.java @@ -1,4 +1,4 @@ -package com.rollthedice.backend.domain.debate.controller; +package com.rollthedice.backend.domain.debate.api; import com.rollthedice.backend.domain.debate.dto.request.DebateMessageRequest; import com.rollthedice.backend.domain.debate.dto.request.DebateRoomRequest; @@ -17,42 +17,48 @@ @RestController @RequiredArgsConstructor @RequestMapping("debates") -public class DebateController { +public class DebateController implements DebateApi { private final DebateRoomService debateRoomService; private final DebateMessageService debateMessageService; @ResponseStatus(HttpStatus.CREATED) @PostMapping("") + @Override public void saveDebateRoom(@RequestBody @Valid final DebateRoomRequest request) { debateRoomService.saveDebateRoom(request); } @ResponseStatus(HttpStatus.OK) @GetMapping("") + @Override public List getDebateRooms(final Pageable pageable) { return debateRoomService.getDebateRooms(pageable); } @ResponseStatus(HttpStatus.NO_CONTENT) @DeleteMapping("/{roomId}") + @Override public void deleteDebateRoom(@PathVariable final Long roomId) { debateRoomService.deleteDebateRoom(roomId); } @ResponseStatus(HttpStatus.CREATED) @PostMapping("/{roomId}/human") + @Override public void saveHumanDebateMessage(@PathVariable final Long roomId, @RequestBody final DebateMessageRequest request) { debateMessageService.saveHumanDebateMessage(roomId, request); } @ResponseStatus(HttpStatus.CREATED) @PostMapping("/{roomId}/ai") + @Override public void saveAIDebateMessage(@PathVariable final Long roomId, @RequestBody final DebateMessageRequest request) { debateMessageService.saveAIDebateMessage(roomId, request); } @ResponseStatus(HttpStatus.OK) @GetMapping("/{roomId}") + @Override public List getDebateMessages(@PathVariable final Long roomId) { return debateMessageService.getDebateMessages(roomId); } From f4de111a18d47e3341bfe92a5409a75233c9f4b9 Mon Sep 17 00:00:00 2001 From: yeonjy Date: Wed, 1 May 2024 03:33:04 +0900 Subject: [PATCH 6/8] =?UTF-8?q?rename:=20=ED=8C=A8=ED=82=A4=EC=A7=80?= =?UTF-8?q?=EB=AA=85=20controller=20->=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../member/{controller => api}/MemberController.java | 7 ++++--- .../java/com/rollthedice/backend/domain/auth/AuthTest.java | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) rename backend/core/src/main/java/com/rollthedice/backend/domain/member/{controller => api}/MemberController.java (90%) diff --git a/backend/core/src/main/java/com/rollthedice/backend/domain/member/controller/MemberController.java b/backend/core/src/main/java/com/rollthedice/backend/domain/member/api/MemberController.java similarity index 90% rename from backend/core/src/main/java/com/rollthedice/backend/domain/member/controller/MemberController.java rename to backend/core/src/main/java/com/rollthedice/backend/domain/member/api/MemberController.java index 4817d16d..59284ff2 100644 --- a/backend/core/src/main/java/com/rollthedice/backend/domain/member/controller/MemberController.java +++ b/backend/core/src/main/java/com/rollthedice/backend/domain/member/api/MemberController.java @@ -1,4 +1,4 @@ -package com.rollthedice.backend.domain.member.controller; +package com.rollthedice.backend.domain.member.api; import com.rollthedice.backend.domain.member.dto.MemberServiceDto; import com.rollthedice.backend.domain.member.dto.MemberUpdateDto; @@ -13,10 +13,10 @@ @RestController @RequiredArgsConstructor @RequestMapping("members") -public class MemberController { +public class MemberController implements MemberApi{ private final MemberService memberService; - @PostMapping + @PostMapping("") public ResponseEntity updateMember(@LoginMemberEmail String email, @RequestBody MemberUpdateDto memberUpdateDto) { MemberServiceDto memberServiceDto = memberUpdateDto.toServiceDto(email); @@ -31,6 +31,7 @@ public ResponseEntity updateMember(@LoginMemberEmail String email, @ResponseStatus(HttpStatus.OK) @GetMapping("") + @Override public MemberResponse getMemberInfo() { return memberService.getMemberInfo(); } diff --git a/backend/core/src/test/java/com/rollthedice/backend/domain/auth/AuthTest.java b/backend/core/src/test/java/com/rollthedice/backend/domain/auth/AuthTest.java index 25085d20..9d1f0085 100644 --- a/backend/core/src/test/java/com/rollthedice/backend/domain/auth/AuthTest.java +++ b/backend/core/src/test/java/com/rollthedice/backend/domain/auth/AuthTest.java @@ -2,7 +2,7 @@ import com.auth0.jwt.JWT; import com.auth0.jwt.algorithms.Algorithm; -import com.rollthedice.backend.domain.member.controller.MemberController; +import com.rollthedice.backend.domain.member.api.MemberController; import com.rollthedice.backend.domain.member.dto.MemberUpdateDto; import com.rollthedice.backend.domain.member.service.MemberService; import com.rollthedice.backend.global.LoginTest; From d21103295bcc63b5c00737b8aaccc350de8c7d5c Mon Sep 17 00:00:00 2001 From: yeonjy Date: Wed, 1 May 2024 03:33:37 +0900 Subject: [PATCH 7/8] =?UTF-8?q?feat:=20Member=20API=20swagger=20=EC=84=A4?= =?UTF-8?q?=EB=AA=85=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/domain/member/api/MemberApi.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 backend/core/src/main/java/com/rollthedice/backend/domain/member/api/MemberApi.java diff --git a/backend/core/src/main/java/com/rollthedice/backend/domain/member/api/MemberApi.java b/backend/core/src/main/java/com/rollthedice/backend/domain/member/api/MemberApi.java new file mode 100644 index 00000000..3f87ce34 --- /dev/null +++ b/backend/core/src/main/java/com/rollthedice/backend/domain/member/api/MemberApi.java @@ -0,0 +1,20 @@ +package com.rollthedice.backend.domain.member.api; + +import com.rollthedice.backend.domain.member.dto.response.MemberResponse; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; + +public interface MemberApi { + @Operation( + summary = "회원 정보 조회", + description = "회원 정보를 조회합니다.", + security = {@SecurityRequirement(name = "access_token")}, + tags = {"member"} + ) + @ApiResponse( + responseCode = "200", + description = "OK" + ) + MemberResponse getMemberInfo(); +} From b955ff3621bafd0f3996bf3cf655324f7dcbf695 Mon Sep 17 00:00:00 2001 From: yeonjy Date: Wed, 1 May 2024 03:36:10 +0900 Subject: [PATCH 8/8] =?UTF-8?q?feat:=20News=20API=20swagger=20=EC=84=A4?= =?UTF-8?q?=EB=AA=85=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/domain/news/api/NewsApi.java | 23 +++++++++++++++++++ .../{controller => api}/NewsController.java | 5 ++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 backend/core/src/main/java/com/rollthedice/backend/domain/news/api/NewsApi.java rename backend/core/src/main/java/com/rollthedice/backend/domain/news/{controller => api}/NewsController.java (84%) diff --git a/backend/core/src/main/java/com/rollthedice/backend/domain/news/api/NewsApi.java b/backend/core/src/main/java/com/rollthedice/backend/domain/news/api/NewsApi.java new file mode 100644 index 00000000..c66a033d --- /dev/null +++ b/backend/core/src/main/java/com/rollthedice/backend/domain/news/api/NewsApi.java @@ -0,0 +1,23 @@ +package com.rollthedice.backend.domain.news.api; + +import com.rollthedice.backend.domain.news.dto.response.NewsResponse; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import org.springframework.data.domain.Pageable; + +import java.util.List; + +public interface NewsApi { + @Operation( + summary = "요약 뉴스 조회", + description = "요약 뉴스를 페이지로 나누어 조회합니다.", + security = {@SecurityRequirement(name = "access_token")}, + tags = {"news"} + ) + @ApiResponse( + responseCode = "200", + description = "OK" + ) + List getNews(Pageable pageable); +} diff --git a/backend/core/src/main/java/com/rollthedice/backend/domain/news/controller/NewsController.java b/backend/core/src/main/java/com/rollthedice/backend/domain/news/api/NewsController.java similarity index 84% rename from backend/core/src/main/java/com/rollthedice/backend/domain/news/controller/NewsController.java rename to backend/core/src/main/java/com/rollthedice/backend/domain/news/api/NewsController.java index 7f138c81..83128e2f 100644 --- a/backend/core/src/main/java/com/rollthedice/backend/domain/news/controller/NewsController.java +++ b/backend/core/src/main/java/com/rollthedice/backend/domain/news/api/NewsController.java @@ -1,4 +1,4 @@ -package com.rollthedice.backend.domain.news.controller; +package com.rollthedice.backend.domain.news.api; import com.rollthedice.backend.domain.news.dto.response.NewsResponse; import com.rollthedice.backend.domain.news.service.NewsService; @@ -12,11 +12,12 @@ @RestController @RequiredArgsConstructor @RequestMapping("news") -public class NewsController { +public class NewsController implements NewsApi { private final NewsService newsService; @ResponseStatus(HttpStatus.OK) @GetMapping("") + @Override public List getNews(final Pageable pageable) { return newsService.getNews(pageable); }