fix: infra token expriry check on guard (#4219)
fix: null check added in infraToken expiry check on guard
This commit is contained in:
parent
c9f92282bf
commit
e26528cedf
1 changed files with 1 additions and 1 deletions
|
|
@ -38,7 +38,7 @@ export class InfraTokenGuard implements CanActivate {
|
|||
throw new UnauthorizedException(INFRA_TOKEN_INVALID_TOKEN);
|
||||
|
||||
const currentTime = DateTime.now().toISO();
|
||||
if (currentTime > infraToken.expiresOn.toISOString()) {
|
||||
if (currentTime > infraToken.expiresOn?.toISOString()) {
|
||||
throw new UnauthorizedException(INFRA_TOKEN_EXPIRED);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue