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:
43 files changed
+1103
-69
No files matched your search
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user