Merge pull request #54 from calcom/fix-api-key-expire

pull/9078/head
Agusti Fernandez 2022-04-23 04:17:34 +02:00 committed by GitHub
commit 4e58e87264
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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. // Used to check if the apiKey is not expired, could be extracted if reused. but not for now.
export const dateNotInPast = function (date: Date) { export const dateNotInPast = function (date: Date) {
const now = new 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; return true;
} }
}; };