9a4c6863d1
- Add stages module with full CRUD API and admin overview island - Add mobility overview island (Liste, Kanban, Detail CRUD views) - Add contract PDF upload/download endpoints for mobilites - Add light/dark theme toggle in header - Add employeeOnly flag to hide entire modules from students (admin, students, stages) - Add read-only GET endpoints for modules/ues/ue-modules in notes module - Add [slug].tsx catch-all routes for direct URL navigation - Replace old mobility table with mobilites + stages schema (migration 0004) - Allow students to create mobilites and upload contracts - Redirect authenticated users from / to /apps catalog
13 lines
363 B
TypeScript
13 lines
363 B
TypeScript
import { Handlers } from "$fresh/server.ts";
|
|
import { db } from "$root/databases/db.ts";
|
|
import { modules } from "$root/databases/schema.ts";
|
|
|
|
export const handler: Handlers = {
|
|
async GET() {
|
|
const rows = await db.select().from(modules);
|
|
return new Response(JSON.stringify(rows), {
|
|
headers: { "content-type": "application/json" },
|
|
});
|
|
},
|
|
};
|