Initial commit
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { NextResponse } from 'next/server'
|
||||
import { METHODS, frappeCall } from '@/lib/lukenya-api'
|
||||
|
||||
// Current published legal documents (terms, indemnity, privacy, optional consents).
|
||||
export async function GET() {
|
||||
try {
|
||||
const docs = await frappeCall<unknown[]>(METHODS.legalDocuments, { revalidate: 60 })
|
||||
return NextResponse.json(docs || [], { headers: { 'Cache-Control': 'public, max-age=60' } })
|
||||
} catch {
|
||||
return NextResponse.json([], { status: 503 })
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user