feat: remove from subdir

This commit is contained in:
2023-07-27 15:53:03 +02:00
parent 866a521508
commit 1917fc7d8f
8 changed files with 14 additions and 15 deletions

11
routes/api/index.ts Normal file
View File

@ -0,0 +1,11 @@
import { HandlerContext } from "$fresh/server.ts";
import { getDocuments } from "@lib/documents.ts";
export const handler = async (
_req: Request,
_ctx: HandlerContext,
): Promise<Response> => {
const documents = await getDocuments();
const response = new Response(JSON.stringify(documents));
return response;
};