memorium/routes/api/index.ts

11 lines
267 B
TypeScript
Raw Normal View History

2023-08-01 17:50:00 +02:00
import { Handlers } from "$fresh/server.ts";
2023-07-27 15:28:50 +02:00
import { getDocuments } from "@lib/documents.ts";
2023-08-01 17:50:00 +02:00
import { json } from "@lib/helpers.ts";
2023-07-26 13:47:01 +02:00
2023-08-01 17:50:00 +02:00
export const handler: Handlers = {
async GET() {
const documents = await getDocuments();
return json(documents);
},
2023-07-26 13:47:01 +02:00
};