mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-06-28 23:16:49 +08:00
14 lines
434 B
TypeScript
14 lines
434 B
TypeScript
import { Handlers } from "$fresh/server.ts";
|
|
import { load_settings } from "../../config.ts";
|
|
import { get_cfg_path } from "../../server.ts";
|
|
|
|
export const handler: Handlers = {
|
|
async GET(_req, _ctx) {
|
|
const path = get_cfg_path();
|
|
const cfg = await load_settings(path);
|
|
return new Response(JSON.stringify(cfg.to_json()), {
|
|
headers: { "Content-Type": "application/json" },
|
|
});
|
|
},
|
|
};
|