2023-07-26 13:47:01 +02:00
|
|
|
import { HandlerContext } from "$fresh/server.ts";
|
2023-07-27 15:28:50 +02:00
|
|
|
import { getDocuments } from "@lib/documents.ts";
|
2023-07-26 13:47:01 +02:00
|
|
|
|
|
|
|
export const handler = async (
|
|
|
|
_req: Request,
|
|
|
|
_ctx: HandlerContext,
|
|
|
|
): Promise<Response> => {
|
|
|
|
const documents = await getDocuments();
|
|
|
|
const response = new Response(JSON.stringify(documents));
|
|
|
|
return response;
|
|
|
|
};
|