d3de5c29e7
feat(notes): add XLSX import island and admin route feat(upload): add drag‑and‑drop upload, template download, UI tweaks
17 lines
575 B
TypeScript
17 lines
575 B
TypeScript
import { FreshContext, Handlers } from "$fresh/server.ts";
|
|
import { db } from "$root/databases/db.ts";
|
|
import { permissions } from "$root/databases/schema.ts";
|
|
import { AuthenticatedState } from "$root/defaults/interfaces.ts";
|
|
|
|
export const handler: Handlers<null, AuthenticatedState> = {
|
|
async GET(
|
|
_request: Request,
|
|
_context: FreshContext<AuthenticatedState>,
|
|
): Promise<Response> {
|
|
const result = await db.select().from(permissions);
|
|
return new Response(JSON.stringify(result), {
|
|
headers: { "content-type": "application/json" },
|
|
});
|
|
},
|
|
};
|