fischerX/tools/cli/templates/api/route.ts.template

17 lines
365 B
Plaintext

import { NextResponse } from 'next/server';
export async function GET() {
return NextResponse.json({
message: '{{pascalName}} API',
timestamp: new Date().toISOString(),
});
}
export async function POST(request: Request) {
const body = await request.json();
return NextResponse.json({
message: '{{pascalName}} created',
data: body,
});
}