Openstatus www.openstatus.dev

๐Ÿ“ vercel (#680)

authored by

Thibault Le Ouay and committed by
GitHub
d5b4d856 3e090c9f

+14
+14
apps/web/src/app/api/ping/vercel/route.ts
··· 1 + import { NextResponse } from "next/server"; 2 + 3 + export const dynamic = "force-dynamic"; 4 + 5 + export const maxDuration = 42; // to trick and not using the same function as the other ping route 6 + 7 + export async function GET() { 8 + return NextResponse.json({ ping: "pong" }, { status: 200 }); 9 + } 10 + 11 + export async function POST(req: Request) { 12 + const body = await req.json(); 13 + return NextResponse.json({ ping: body }, { status: 200 }); 14 + }