Skip to content

Commit

Permalink
Merge pull request #270 from BCSDLab/feature/#299
Browse files Browse the repository at this point in the history
[회원가입] 회원가입 시 닉네임을 admin을 사용할 수 없도록 변경
  • Loading branch information
chaeseungyun authored Feb 27, 2024
2 parents 9a1e6ad + da73335 commit e33c761
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Binary file removed .yarn/cache/fsevents-patch-21ad2b1333-8.zip
Binary file not shown.
10 changes: 7 additions & 3 deletions src/pages/Auth/Signup/CompletePage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ export default function CompleteForm() {

const onSubmit = async ({ nickname }: CompleteFormData) => {
try {
await modify({ nickname });
sessionStorage.removeItem('accessToken');
open();
if (nickname !== 'admin') {
await modify({ nickname });
sessionStorage.removeItem('accessToken');
open();
} else {
makeToast('error', '사용할 수 없는 닉네임입니다.');
}
} catch (error) {
makeToast('error', '닉네임 설정에 실패했습니다.');
}
Expand Down

0 comments on commit e33c761

Please sign in to comment.