feat: automatic no show (#16727)

Co-authored-by: Carina Wollendorfer <[email protected]>
Co-authored-by: Alex van Andel <[email protected]>
Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: CarinaWolli <[email protected]>
Co-authored-by: zomars <[email protected]>
This commit is contained in:
authored and GitHub committed 2024-10-10 10:57:04 -07:00
1 parent ef88effd9f
commit 395381ddcc
43 files changed
+1103 -69

No files matched your search

+9 -1
View File
@@ -3,7 +3,7 @@ import { NextResponse } from "next/server";
import tasker from "..";
export async function GET(request: NextRequest) {
async function handler(request: NextRequest) {
const authHeader = request.headers.get("authorization");
if (authHeader !== `Bearer ${process.env.CRON_SECRET}`) {
return new Response("Unauthorized", { status: 401 });
@@ -11,3 +11,11 @@ export async function GET(request: NextRequest) {
await tasker.processQueue();
return NextResponse.json({ success: true });
}
export async function GET(request: NextRequest) {
return await handler(request);
}
export async function POST(request: NextRequest) {
return await handler(request);
}