API endpoint returning /data/services.json

This commit is contained in:
Neshura 2024-01-02 02:09:23 +01:00
parent b4f295bf46
commit 466f637207
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);
}