import { json_response } from "utils"; import { get_db_obj } from "db"; export async function handler(req: Request): Promise { if (req.method == "GET") { return await get(); } else { return new Response(JSON.stringify({ err: "expected a GET" })); } } async function get(): Promise { return json_response(await get_db_obj()); }