Skip to content

Commit

Permalink
refactor: #15 API URL 오타 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ehs208 committed Nov 4, 2024
1 parent 2ff9bb3 commit e7422d7
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -17,7 +18,7 @@
import lombok.RequiredArgsConstructor;

@RestController
@RequestMapping("/articles")
@RequestMapping("/api/articles")
@RequiredArgsConstructor
public class PostController {

Expand All @@ -29,4 +30,12 @@ public ResponseEntity<GlobalResponseDto<List<ArticlesResponseDto>>> getArticles(
return ResponseEntity.status(HttpStatus.OK)
.body(GlobalResponseDto.success(postService.getArticles(customId)));
}

@GetMapping("/{customId}/list/media")
@Operation(summary = "특정 사용자의 미디어 게시글 조회", description = "특정 사용자의 미디어 게시글을 조회합니다.")
public ResponseEntity<GlobalResponseDto<List<ArticleWithMediaResponseDto>>> getMediaArticles(
@PathVariable String customId) {
return ResponseEntity.status(HttpStatus.OK)
.body(GlobalResponseDto.success(postService.getMediaArticles(customId)));
}
}

0 comments on commit e7422d7

Please sign in to comment.