11 lines
272 B
TypeScript
11 lines
272 B
TypeScript
import { Handlers } from "$fresh/server.ts";
|
|
import { getAllRecipes } from "@lib/resource/recipes.ts";
|
|
import { json } from "@lib/helpers.ts";
|
|
|
|
export const handler: Handlers = {
|
|
async GET() {
|
|
const recipes = await getAllRecipes();
|
|
return json(recipes);
|
|
},
|
|
};
|