Skip to content

Commit

Permalink
fix: 내려가는 필드에서 password 는 삭제하자
Browse files Browse the repository at this point in the history
  • Loading branch information
ndaemy committed Aug 29, 2023
1 parent fdd1576 commit a8535c9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/api/users/users.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,15 @@ export class UsersService {
throw new NotFoundException(notFoundErrors);
}

return this.prismaService.user.update({
const user = await this.prismaService.user.update({
where: {
id: userInfoFromDB.id,
},
data: { enableTimes: dates },
});

delete user.password;

return user;
}
}

0 comments on commit a8535c9

Please sign in to comment.