Skip to content

Commit

Permalink
feat: 닉네임 10자 제한
Browse files Browse the repository at this point in the history
  • Loading branch information
xxeol2 committed Jan 10, 2022
1 parent 61a7511 commit 643b5ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions functions/api/routes/auth/authSignUpPOST.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions functions/constants/responseMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = {
CREATED_USER: '회원 가입 성공',
DELETE_USER: '회원 탈퇴 성공',
ALREADY_SOCIALID: '이미 사용중인 소셜 아이디입니다.',
TOO_LONG_NICKNAME: '닉네임은 10자를 초과할 수 없습니다',

// 로그인
LOGIN_SUCCESS: '로그인 성공',
Expand Down

0 comments on commit 643b5ad

Please sign in to comment.