11 lines
273 B
TypeScript
Raw Permalink Normal View History

2023-08-01 21:35:21 +02:00
import { Handlers } from "$fresh/server.ts";
import { getAllArticles } from "@lib/resource/articles.ts";
import { json } from "@lib/helpers.ts";
export const handler: Handlers = {
async GET() {
const movies = await getAllArticles();
return json(movies);
},
};