fix: disable webhook on Vercel

This commit is contained in:
Hossein Mehrabi 2023-08-31 16:16:33 +03:30
parent 3d1a46bffc
commit f8f738965e
No known key found for this signature in database
GPG Key ID: 45C04964191AFAA1
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ export const getWebhookData = async (): Promise<WebhookData> =>
JSON.parse((await readFile(WEBHOOK_DATA_PATH, 'utf-8')) || '{}')
let initialized = false
if (IS_VERCEL && !initialized) writeWebhookData({ lastUpdate: +new Date() })
if (!IS_VERCEL && !initialized) writeWebhookData({ lastUpdate: +new Date() })
export default async function handler(
req: NextApiRequest,