11 lines
283 B
TypeScript
Raw Normal View History

2023-08-01 17:50:00 +02:00
import { Handlers } from "$fresh/server.ts";
import { getRecipe } from "@lib/resource/recipes.ts";
import { json } from "@lib/helpers.ts";
export const handler: Handlers = {
async GET(_, ctx) {
const recipe = await getRecipe(ctx.params.name);
return json(recipe);
},
2023-07-26 13:47:01 +02:00
};