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
|
|
|
};
|