Skip to content

Commit

Permalink
Merge pull request #31 from jjikky/feature/fix
Browse files Browse the repository at this point in the history
♻️ 철자 오류 수정 - @true.choi (최진실)
  • Loading branch information
jjikky authored Jul 6, 2024
2 parents dd3d9b3 + 53d3af4 commit 347a1ea
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/routes/user/user.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const config = require('../../common/config');
const userService = require('./user.service');
const sendResponse = require('../../common/utils/response-handler');
const ErrorMessage = require('../../common/constants/error-message');
const SucesssMessage = require('../../common/constants/success-message');
const SuccessMessage = require('../../common/constants/success-message');
const { validateRequest } = require('../../common/utils/request.validator');
const {
nicknameCheckReqQuerySchema,
Expand All @@ -23,7 +23,7 @@ exports.register = async (req, res) => {

const data = { user_id: newUser._id };
sendResponse.created(res, {
message: SucesssMessage.REGISTER_SUCCESSS,
message: SuccessMessage.REGISTER_SUCCESSS,
data,
});
} catch (err) {
Expand All @@ -49,7 +49,7 @@ exports.isNicknameExist = async (req, res) => {
}

return sendResponse.ok(res, {
message: SucesssMessage.AVAILABLE_NICKNAME,
message: SuccessMessage.AVAILABLE_NICKNAME,
data,
});
} catch (err) {
Expand All @@ -74,7 +74,7 @@ exports.isEmailExist = async (req, res) => {
});
}
return sendResponse.ok(res, {
message: SucesssMessage.AVAILABLE_EMAIL,
message: SuccessMessage.AVAILABLE_EMAIL,
data,
});
} catch (err) {
Expand Down Expand Up @@ -103,7 +103,7 @@ exports.localLogin = async (req, res, next) => {
res.cookie('refreshToken', refreshToken, config.cookieInRefreshTokenOptions);

return sendResponse.ok(res, {
message: SucesssMessage.LOGIN_SUCCESSS,
message: SuccessMessage.LOGIN_SUCCESSS,
data: {
accessToken: accessToken,
},
Expand Down Expand Up @@ -135,7 +135,7 @@ exports.kakaoLogin = async (req, res) => {
res.cookie('refreshToken', refreshToken, config.cookieInRefreshTokenOptions);

sendResponse.ok(res, {
message: SucesssMessage.LOGIN_SUCCESSS,
message: SuccessMessage.LOGIN_SUCCESSS,
data: {
accessToken: accessToken,
},
Expand Down Expand Up @@ -167,7 +167,7 @@ exports.refreshToken = async (req, res) => {
res.cookie('refreshToken', newRefreshToken, config.cookieInRefreshTokenOptions);

sendResponse.ok(res, {
message: SucesssMessage.REFRESH_TOKEN,
message: SuccessMessage.REFRESH_TOKEN,
data: {
accessToken: newAccessToken,
},
Expand All @@ -179,15 +179,15 @@ exports.getProfile = (req, res) => {
const { _id, nickname, email } = req.user;
const data = { _id, nickname, email };
sendResponse.ok(res, {
message: SucesssMessage.GET_PROFILE_SUCCESS,
message: SuccessMessage.GET_PROFILE_SUCCESS,
data,
});
};

exports.logout = (_, res) => {
res.clearCookie('refreshToken');
return sendResponse.ok(res, {
message: SucesssMessage.LOGOUT_SUCCESS,
message: SuccessMessage.LOGOUT_SUCCESS,
});
};

Expand All @@ -196,7 +196,7 @@ exports.recentSearches = async (req, res) => {
const { _id } = req.user;
const recentSearches = await userService.getRecentSearches(_id);
sendResponse.ok(res, {
message: SucesssMessage.RECENT_WORDS_SUCCESS,
message: SuccessMessage.RECENT_WORDS_SUCCESS,
data: { recentSearches },
});
} catch (err) {
Expand All @@ -211,7 +211,7 @@ exports.delRecentSearch = async (req, res) => {
const { searchTerm } = req.params;
await userService.delRecentSearch(_id, searchTerm);
sendResponse.ok(res, {
message: SucesssMessage.DELETE_RECENT_WORD_SUCCESS,
message: SuccessMessage.DELETE_RECENT_WORD_SUCCESS,
});
} catch (err) {
console.log(err);
Expand Down

0 comments on commit 347a1ea

Please sign in to comment.