feat: Phase 7.2 보완 - 나의 게시글 API 추가
- PostService.getMyPosts() 메서드 추가 - PostController.myPosts() 액션 추가 - GET /v1/posts/my 라우트 추가 - PostApi.php Swagger 문서 추가
This commit is contained in:
@@ -21,6 +21,19 @@ public function __construct(
|
||||
protected PostService $postService
|
||||
) {}
|
||||
|
||||
/**
|
||||
* 나의 게시글 목록 조회
|
||||
*/
|
||||
public function myPosts()
|
||||
{
|
||||
return ApiResponse::handle(function () {
|
||||
$filters = request()->only(['board_code', 'search', 'status']);
|
||||
$perPage = (int) request()->get('per_page', 15);
|
||||
|
||||
return $this->postService->getMyPosts($filters, $perPage);
|
||||
}, __('message.fetched'));
|
||||
}
|
||||
|
||||
/**
|
||||
* 게시글 목록 조회
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user