Openstatus www.openstatus.dev

Add an additional ping endpoint for separate testing (#681)

authored by

Malte Ubl and committed by
GitHub
f91e56c5 d5b4d856

+14
+14
apps/web/src/app/api/ping/test/route.ts
··· 1 + import { NextResponse } from "next/server"; 2 + 3 + export const dynamic = "force-dynamic"; 4 + 5 + export const maxDuration = 31; // 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 + }