diff --git a/functions/api/routes/auth/authSignUpPOST.js b/functions/api/routes/auth/authSignUpPOST.js index 3715f18..1853b08 100644 --- a/functions/api/routes/auth/authSignUpPOST.js +++ b/functions/api/routes/auth/authSignUpPOST.js @@ -28,6 +28,11 @@ module.exports = async (req, res) => { return res.status(statusCode.BAD_REQUEST).send(util.fail(statusCode.BAD_REQUEST, responseMessage.NULL_VALUE)); } + // @error 3. 닉네임 10자 초과 + if (nickname.length > 10){ + return res.status(statusCode.BAD_REQUEST).send(util.fail(statusCode.BAD_REQUEST, responseMessage.TOO_LONG_NICKNAME)); + } + let client; try { @@ -54,7 +59,7 @@ module.exports = async (req, res) => { res.status(statusCode.OK).send(util.success(statusCode.OK, responseMessage.CREATED_USER, { user, accesstoken })); } catch (error) { console.log(error); - functions.logger.error(`[SIGNUP ERROR] [${req.method.toUpperCase()}] ${req.originalUrl}`, `[CONTENT] email:${socialId} ${error}`); + functions.logger.error(`[SIGNUP ERROR] [${req.method.toUpperCase()}] ${req.originalUrl}`, `[CONTENT] socialId:${socialId} ${error}`); res.status(statusCode.INTERNAL_SERVER_ERROR).send(util.fail(statusCode.INTERNAL_SERVER_ERROR, responseMessage.INTERNAL_SERVER_ERROR)); } finally { diff --git a/functions/constants/responseMessage.js b/functions/constants/responseMessage.js index ecff181..6a47795 100644 --- a/functions/constants/responseMessage.js +++ b/functions/constants/responseMessage.js @@ -6,6 +6,7 @@ module.exports = { CREATED_USER: '회원 가입 성공', DELETE_USER: '회원 탈퇴 성공', ALREADY_SOCIALID: '이미 사용중인 소셜 아이디입니다.', + TOO_LONG_NICKNAME: '닉네임은 10자를 초과할 수 없습니다', // 로그인 LOGIN_SUCCESS: '로그인 성공',