From e7422d72b73403ae173e3d3e32a71bcb2735be58 Mon Sep 17 00:00:00 2001 From: EunHyunsu Date: Mon, 4 Nov 2024 17:34:17 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20#15=20API=20URL=20=EC=98=A4?= =?UTF-8?q?=ED=83=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/post/controller/PostController.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/leets/xcellentbe/domain/post/controller/PostController.java b/src/main/java/com/leets/xcellentbe/domain/post/controller/PostController.java index 633f0ef..a167072 100644 --- a/src/main/java/com/leets/xcellentbe/domain/post/controller/PostController.java +++ b/src/main/java/com/leets/xcellentbe/domain/post/controller/PostController.java @@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import com.leets.xcellentbe.domain.post.dto.ArticleWithMediaResponseDto; import com.leets.xcellentbe.domain.post.dto.ArticlesResponseDto; import com.leets.xcellentbe.domain.post.service.PostService; import com.leets.xcellentbe.global.response.GlobalResponseDto; @@ -17,7 +18,7 @@ import lombok.RequiredArgsConstructor; @RestController -@RequestMapping("/articles") +@RequestMapping("/api/articles") @RequiredArgsConstructor public class PostController { @@ -29,4 +30,12 @@ public ResponseEntity>> getArticles( return ResponseEntity.status(HttpStatus.OK) .body(GlobalResponseDto.success(postService.getArticles(customId))); } + + @GetMapping("/{customId}/list/media") + @Operation(summary = "특정 사용자의 미디어 게시글 조회", description = "특정 사용자의 미디어 게시글을 조회합니다.") + public ResponseEntity>> getMediaArticles( + @PathVariable String customId) { + return ResponseEntity.status(HttpStatus.OK) + .body(GlobalResponseDto.success(postService.getMediaArticles(customId))); + } }