Skip to content

Commit

Permalink
fix: nickname setting
Browse files Browse the repository at this point in the history
  • Loading branch information
kyeahxx19 committed Dec 12, 2023
1 parent 7b4cb2d commit 2b89940
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions src/common/enums/nickname.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,34 @@ export enum Nickname {
뽀삐뽀,
두부,
크림빵,
바나나,
초코,
삼합,
아보카도,
녹차,
딸기,
붕어빵,
호두,
만쥬,
델리,
맹구,
짱구,
뽀로로,
둘리,
버찌,
치즈,
뚜비,
까망,
베르,
댕댕,
생강,
피카츄,
라이츄,
꼬북,
파이리,
꼬렛,
스투시,
수프,
카레,
레몬,
}
2 changes: 1 addition & 1 deletion src/user/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class UserService {

async createUser() {
const nicknames = Object.values(Nickname);
const rand = Math.floor(Math.random() * 100000);
const rand = Math.floor(Math.random() * 1000);
const index = rand % nicknames.length;
const nickname = nicknames[index].toString() + rand.toString();
const user = await this.userRepository.create({
Expand Down

0 comments on commit 2b89940

Please sign in to comment.