From df962c0b12c20f7aaf9faaef4edb7212b29ec406 Mon Sep 17 00:00:00 2001 From: Jomariel Gaitera Date: Thu, 5 Sep 2024 20:38:23 +0800 Subject: [PATCH] fix(api): fix condition typo --- src/modules/auth/authService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/auth/authService.ts b/src/modules/auth/authService.ts index b223e38..70b90c6 100644 --- a/src/modules/auth/authService.ts +++ b/src/modules/auth/authService.ts @@ -109,7 +109,7 @@ export class AuthService { const expires = new Date(info.expires); const now = new Date(); - if (now <= expires) { + if (now >= expires) { throw new Unauthorized('API key expired'); } }