-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEAT] 게시글 전체 조회, 신고하기 swagger 명세 (#333)
* [FEAT] community post 전체 조회 명세 * [FEAT] community 신고 swagger 명세 * [CHORE] @route에서 ?page삭제 Co-authored-by: Hyosik Philip Joo <[email protected]> * [CHORE] router GET /posts의communityPostListGet을 communityPostListGET으로 변경 * Rename [CHORE] communityPostCategoryGet.js to communityPostCategoryGET.js * [CHORE] Rename communityPostListGet.js to communityPostListGET.js * [CHORE] responseCommunityPostsListSchema->responseCommunityPostsSchema로 변경, POST report swagger.requestBody 추가 * [CHORE] 게시글 전체 조회, 카테고리 조회 request query에 limit 추가, response에 totalItemCount 추가 * [CHORE] 커뮤니티 카테고리별 게시글 조회 /community/category/:communityCategoryId 로 엔드포인트 변경 * [CHORE] 커뮤니티 게시물 신고 api에 404 에러 명세 추가 --------- Co-authored-by: Hyosik Philip Joo <[email protected]>
- Loading branch information
1 parent
30f21ba
commit b552c51
Showing
7 changed files
with
236 additions
and
41 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
bracketSpacing: true, | ||
jsxBracketSameLine: true, | ||
singleQuote: true, | ||
trailingComma: 'all', | ||
arrowParens: 'always', | ||
printWidth: 200, | ||
tabWidth: 2, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** | ||
* @route GET /community/category/:communityCategoryId | ||
* @desc 커뮤니티 카테고리별 게시글 조회 | ||
* @access Private | ||
*/ | ||
|
||
module.exports = async (req, res) => { | ||
const { page, limit } = req.query; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** | ||
* @route GET /community/posts | ||
* @desc 커뮤니티 게시글 전체 조회 | ||
* @access Private | ||
*/ | ||
|
||
module.exports = async (req, res) => { | ||
const { page, limit } = req.query; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** | ||
* @route POST /community/report | ||
* @desc 커뮤니티 게시글 신고 | ||
* @access Private | ||
*/ | ||
|
||
module.exports = async (req, res) => { | ||
const { communityPostId } = req.body; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,94 @@ | ||
const responseCommunityCategorySchema = { | ||
$status: 200, | ||
$success: true, | ||
$message: "커뮤니티 카테고리 조회 성공", | ||
$data: [ | ||
{ | ||
$id: 1, | ||
$name: "UI/UX" | ||
}, | ||
] | ||
$status: 200, | ||
$success: true, | ||
$message: '커뮤니티 카테고리 조회 성공', | ||
$data: [ | ||
{ | ||
$id: 1, | ||
$name: 'UI/UX', | ||
}, | ||
], | ||
}; | ||
|
||
const responseCommunityPostsDetailSchema = { | ||
$status: 200, | ||
$success: true, | ||
$message: "커뮤니티 게시글 상세 조회 성공", | ||
$data: { | ||
$status: 200, | ||
$success: true, | ||
$message: '커뮤니티 게시글 상세 조회 성공', | ||
$data: { | ||
$id: 1, | ||
$nickname: '잡채', | ||
$profileImage: 'https://s3~', | ||
$title: '제목', | ||
$body: '본문', | ||
$contentUrl: 'https://naver.com', | ||
$contentTitle: '콘텐츠 링크 제목', | ||
$contentDescription: '콘텐츠 링크 설명', | ||
$thumbnailUrl: 'https://content-thumbnail-image-url', | ||
$createdAt: '2024-02-01', | ||
}, | ||
}; | ||
|
||
const responseCommunityPostsSchema = { | ||
$status: 200, | ||
$success: true, | ||
$message: '커뮤니티 게시글 전체 조회 성공', | ||
$data: { | ||
$posts: [ | ||
{ | ||
$id: 1, | ||
$nickname: "잡채", | ||
$profileImage: "https://s3~", | ||
$title: "제목", | ||
$body: "본문", | ||
$contentUrl: "https://naver.com", | ||
$contentTitle: "콘텐츠 링크 제목", | ||
$contentDescription: "콘텐츠 링크 설명", | ||
$thumbnailUrl: "https://content-thumbnail-image-url", | ||
$createdAt: "2024-02-01", | ||
}, | ||
} | ||
$nickname: '잡채', | ||
$profileImage: 'https://s3~', | ||
$title: '제목1', | ||
$body: '본문1', | ||
$contentUrl: 'https://naver.com', | ||
$contentTitle: '콘텐츠 링크 제목1', | ||
$contentDescription: '콘텐츠 링크 설명1', | ||
$thumbnailUrl: 'https://content-thumbnail-image-url1', | ||
$createdAt: '2024-02-01', | ||
}, | ||
{ | ||
$id: 2, | ||
$nickname: '필립', | ||
$profileImage: 'https://s3~', | ||
$title: '제목2', | ||
$body: '본문2', | ||
$contentUrl: 'https://example2.com', | ||
$contentTitle: '콘텐츠 링크 제목2', | ||
$contentDescription: '콘텐츠 링크 설명2', | ||
$thumbnailUrl: 'https://content-thumbnail-image-url2', | ||
$createdAt: '2024-02-02', | ||
}, | ||
{ | ||
$id: 3, | ||
$nickname: '윱최', | ||
$profileImage: 'https://s3~', | ||
$title: '제목3', | ||
$body: '본문3', | ||
$contentUrl: 'https://example3.com', | ||
$contentTitle: '콘텐츠 링크 제목3', | ||
$contentDescription: '콘텐츠 링크 설명3', | ||
$thumbnailUrl: 'https://content-thumbnail-image-url3', | ||
$createdAt: '2024-02-03', | ||
}, | ||
], | ||
$totalItemCount: 3, | ||
}, | ||
}; | ||
|
||
const responseCommunityReportSchema = { | ||
$status: 200, | ||
$success: true, | ||
$message: '커뮤니티 게시글 신고 성공', | ||
}; | ||
|
||
const requestCommunityReportSchema = { | ||
$communityPostId: 1, | ||
}; | ||
|
||
module.exports = { | ||
responseCommunityCategorySchema, | ||
responseCommunityPostsDetailSchema, | ||
}; | ||
responseCommunityCategorySchema, | ||
responseCommunityPostsDetailSchema, | ||
responseCommunityPostsSchema, | ||
responseCommunityReportSchema, | ||
requestCommunityReportSchema, | ||
}; |