Skip to content

Commit

Permalink
Change api endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
PhamAnhHoang committed Dec 18, 2023
1 parent 43b5c6e commit 71f809c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/api/src/auth/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class AuthController {
}

@UseGuards(JwtRefreshTokenGuard)
@Post('/refresh-token')
@Post('/refresh')
@HttpCode(HttpStatus.OK)
async refreshToken(
@AuthUser() user: Pure<UserEntity>
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export class AuthService {
resetPasswordRequestDto.newPassword
)

return true;
return true
}
return false
}
Expand Down
8 changes: 4 additions & 4 deletions apps/api/src/user/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ export class UserService {
throw new NotFoundException(`There isn't any user with id: ${id}`)
}

user.password = password;
user.passwordResetCode= null;
user.passwordResetExpiredTime = null;
user.password = password
user.passwordResetCode = null
user.passwordResetExpiredTime = null

return this.userRepository.save(user);
return this.userRepository.save(user)
}

async storeRefreshToken(
Expand Down

0 comments on commit 71f809c

Please sign in to comment.