diff --git a/src/auth/auth.controller.ts b/src/auth/auth.controller.ts index aa4d54f..55c2fbe 100644 --- a/src/auth/auth.controller.ts +++ b/src/auth/auth.controller.ts @@ -145,7 +145,8 @@ export class AuthController { } const pageName = Object.keys(Page).find((key) => Page[key] == page); - if (!info[pageName]) throw new BadRequestException('invalid info'); + if (info[pageName] == undefined || info[pageName] == null) + throw new BadRequestException('invalid info'); switch (pageName) { case 'userName': await this.userService.updateUser(id, 'userName', info['userName']);