From d3c7eee13ca21d9d382b1c9424c57fe41838f277 Mon Sep 17 00:00:00 2001 From: Tomas Francisco <4301103+tomasfrancisco@users.noreply.github.com> Date: Wed, 15 Jan 2025 13:39:23 +0100 Subject: [PATCH] fix: set cron job as a get method --- apps/engine/src/app/api/email/cron/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/engine/src/app/api/email/cron/route.ts b/apps/engine/src/app/api/email/cron/route.ts index 19167b5..e9f41ea 100644 --- a/apps/engine/src/app/api/email/cron/route.ts +++ b/apps/engine/src/app/api/email/cron/route.ts @@ -7,7 +7,7 @@ import type { NextRequest } from 'next/server'; * Checks the scheduled emails in the database and sends the emails that are due */ -export async function POST(request: NextRequest) { +export async function GET(request: NextRequest) { const authHeader = request.headers.get('authorization'); // Verify the request is coming from an authorized source if (authHeader !== `Bearer ${serverEnv.CRON_SECRET}`) {