see https://github.com/withastro/astro/issues/10174#issuecomment-2026297879 for the why the tsconfig.json change
18 lines
409 B
TypeScript
18 lines
409 B
TypeScript
import services from "@/data/services-local.json"
|
|
|
|
export async function GET() {
|
|
const response = new Response(
|
|
JSON.stringify(
|
|
services
|
|
.filter(({ enabled }) => !!enabled)
|
|
.map((service) => ({
|
|
id: service.id,
|
|
name: service.name,
|
|
url: service.url,
|
|
})),
|
|
),
|
|
)
|
|
response.headers.set("Content-Type", "application/json")
|
|
return response
|
|
}
|