diff --git a/src/controllers/versionController.js b/src/controllers/versionController.js index f710403..2e5c64e 100644 --- a/src/controllers/versionController.js +++ b/src/controllers/versionController.js @@ -13,7 +13,11 @@ module.exports = { throw new BadRequest(ErrorMessage.BadRequestMeg); } await Version.checkVersion(req).then((result) => { - return res.status(StatusCode.OK).json(result); + return res.status(StatusCode.OK).json({ + success: true, + message: SuccessMessage.versionSuccess, + data: result, + }); }); } catch (err) { next(err); @@ -29,7 +33,11 @@ module.exports = { throw new BadRequest(ErrorMessage.BadRequestMeg); } await Version.updateVersion(req).then((result) => { - return res.status(StatusCode.OK).json(result); + return res.status(StatusCode.OK).json({ + success: true, + message: SuccessMessage.versionUpdate, + data: result, + }); }); } catch (err) { next(err); @@ -38,7 +46,11 @@ module.exports = { getVersions: async function (req, res, next) { try { await Version.getVersions(req).then((result) => { - return res.status(StatusCode.OK).json(result); + return res.status(StatusCode.OK).json({ + success: true, + message: SuccessMessage.versionSuccess, + data: result, + }); }); } catch (err) { next(err); diff --git a/src/utils/response.js b/src/utils/response.js index cde68ab..50129ea 100644 --- a/src/utils/response.js +++ b/src/utils/response.js @@ -59,6 +59,10 @@ const SuccessMessage = { userDeleteSchedulerStart: '탈퇴 유저 삭제 스케줄러 시작', userDeleteSchedulerExit: '탈퇴 유저 삭제 스케줄러 종료', + + /* 버전 */ + versionSuccess: '버전 정보 조회 성공', + versionUpdate: '버전 정보 수정 성공', }; const ErrorMessage = {