Files
lukenyaMarathon_frontend/app/api/legal/route.ts
T
KabundiNjuki ff743a1397 Initial commit
2026-10-05 16:40:36 +03:00

13 lines
477 B
TypeScript

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 })
}
}