fix: apiKeyExpire

pull/9078/head
Agusti Fernandez Pardo 2022-04-23 03:46:53 +02:00
parent 70fd578a0f
commit 11bf548241
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ declare module "next" {
// Used to check if the apiKey is not expired, could be extracted if reused. but not for now.
export const dateNotInPast = function (date: Date) {
const now = new Date();
if (now.setHours(0, 0, 0, 0) <= date.setHours(0, 0, 0, 0)) {
if (now.setHours(0, 0, 0, 0) >= date.setHours(0, 0, 0, 0)) {
return true;
}
};