-
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] 커뮤니티 카테고리 조회 성공 response message 추가 * [FEAT] 커뮤니티 카테고리 조회 성공 쿼리 구현 * [FEAT] 커뮤니티 카테고리 조회 성공 API 구현 * [DOCS] 잘못된 토큰 재발급 엔드포인트 주석 수정 * [CHORE] 관련 response message 복수형으로 변경
- Loading branch information
Showing
4 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
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,9 +1,23 @@ | ||
const util = require('../../../lib/util'); | ||
const statusCode = require('../../../constants/statusCode'); | ||
const responseMessage = require('../../../constants/responseMessage'); | ||
const db = require('../../../db/db'); | ||
const { communityDB } = require('../../../db'); | ||
const asyncWrapper = require('../../../lib/asyncWrapper'); | ||
|
||
/** | ||
* @route GET /community/categories | ||
* @desc 커뮤니티 카테고리 조회 | ||
* @access Public | ||
*/ | ||
|
||
module.exports = async (req, res) => { | ||
module.exports = asyncWrapper(async (req, res) => { | ||
const dbConnection = await db.connect(req); | ||
req.dbConnection = dbConnection; | ||
|
||
const communityCategories = await communityDB.getCommunityCategories(dbConnection); | ||
|
||
}; | ||
res.status(statusCode.OK).send( | ||
util.success(statusCode.OK, responseMessage.READ_COMMUNITY_CATEGORIES_SUCCESS, communityCategories), | ||
); | ||
}); |
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