Skip to content

Commit

Permalink
Handle if token is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
philip-gai committed Apr 4, 2022
1 parent c4c7842 commit 90973c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web-app/src/services/tokenService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ export class TokenService {

public async deleteRefreshToken(userLogin: string): Promise<void> {
this._logger.info(`Deleting user token for "${userLogin}"`);
const item = this._container.item(userLogin, userLogin);
if (item) {
try {
const item = this._container.item(userLogin, userLogin);
await item.delete();
this._logger.info("Deleted user token.");
} else {
} catch {
this._logger.info("No token found for the user.");
}
}
Expand Down

0 comments on commit 90973c0

Please sign in to comment.