API endpoint returning /data/services.json

This commit is contained in:
Neshura 2024-01-02 02:09:23 +01:00
parent ee5d6e947a
commit 7f25f40fe6
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C

View file

@ -0,0 +1,10 @@
import * as fs from "fs";
import {json} from "@sveltejs/kit";
export function GET() {
const content = fs.readFileSync("static/data/services.json").toString();
let data = JSON.parse(content)
return json(data);
}