Skip to content

Commit

Permalink
refactor: Update UserController to simplify updating user's FCM token
Browse files Browse the repository at this point in the history
  • Loading branch information
suk-6 committed Jul 19, 2024
1 parent 70b5433 commit 9bb2a9b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/modules/user/user.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,8 @@ export class UserController {
@CurrentUser() user: User,
@Body() data: UpdateUserFCMTokenDTO,
): Promise<ResponseDTO<null>> {
try {
await this.userService.updateUserFCMTokenById(user.id, data.FCMToken);
return { status: 'success', data: null };
} catch (error) {
return { status: 'error', data: null };
}
await this.userService.updateUserFCMTokenById(user.id, data.FCMToken);
return { status: 'success', data: null };
}

@Put('/profile-image')
Expand Down

0 comments on commit 9bb2a9b

Please sign in to comment.