middleware

This commit is contained in:
peintnermax
2023-08-18 10:46:13 +02:00
parent b3303671c1
commit 26080d0f75
2 changed files with 37 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
import { NextRequest, NextResponse } from "next/server";
export async function GET(request: NextRequest) {
return NextResponse.json({ found: true });
}
export async function POST(request: NextRequest) {
const body = await request.json();
if (body) {
return NextResponse.json({ found: true });
} else {
return NextResponse.error();
}
}