Files
memorium/routes/api/recipes/[name].ts
2026-01-10 13:03:29 +01:00

11 lines
302 B
TypeScript

import { json } from "@lib/helpers.ts";
import { fetchResource } from "@lib/marka/index.ts";
import { define } from "../../../utils.ts";
export const handler = define.handlers({
async GET(ctx) {
const recipe = await fetchResource(`recipes/${ctx.params.name}`);
return json(recipe);
},
});