Skip to content

Commit

Permalink
[FEAT] 다시 들은 곡 뮤멘트 조회 성공 #51
Browse files Browse the repository at this point in the history
  • Loading branch information
hujumee committed Jul 21, 2022
1 parent 2fa244c commit 8cbbf87
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/controllers/MumentController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,25 @@ const getBanner = async (req: Request, res: Response) => {
}
};

/**
* @ROUTE GET mument/again
* @DESC get today's again tagged mument list
*/
const getAgainMument = async (req: Request, res: Response) => {
try {
const data = await MumentService.getAgainMument();

if (data === constant.NO_HOME_CONTENT) {
res.status(statusCode.NO_CONTENT).send(util.success(statusCode.NO_CONTENT, message.GET_AGAIN_MUMENT_SUCCESS));
}

res.status(statusCode.OK).send(util.success(statusCode.OK, message.GET_AGAIN_MUMENT_SUCCESS, data));
} catch (error) {
console.log(error);
res.status(statusCode.INTERNAL_SERVER_ERROR).send(util.fail(statusCode.INTERNAL_SERVER_ERROR, message.INTERNAL_SERVER_ERROR));
}
};

export default {
createMument,
updateMument,
Expand All @@ -293,4 +312,5 @@ export default {
getRandomMument,
getTodayMument,
getBanner,
getAgainMument,
};

0 comments on commit 8cbbf87

Please sign in to comment.