🚀 Backend komplett implementiert

Features:
- Auth mit JWT + Argon2 (Login, Register, Refresh)
- Rollen-System (Chef/Disponent/Mitarbeiter)
- User Management mit Berechtigungen
- Aufträge mit Zuweisungen
- Verfügbarkeitsplanung
- Stundenzettel mit Foto-Upload Support
- Modulares System mit Config
- Entwickler-Panel Endpoints

Tech:
- Deno + Oak
- PostgreSQL
- CORS enabled
This commit is contained in:
2026-02-20 15:12:06 +00:00
parent a07c2ad858
commit ee19e45171
16 changed files with 2079 additions and 2 deletions

17
src/middleware/logger.ts Normal file
View File

@@ -0,0 +1,17 @@
import { Context, Next } from "@oak/oak";
export async function requestLogger(ctx: Context, next: Next): Promise<void> {
const start = Date.now();
await next();
const ms = Date.now() - start;
const status = ctx.response.status;
const method = ctx.request.method;
const url = ctx.request.url.pathname;
const color = status >= 500 ? "\x1b[31m" : status >= 400 ? "\x1b[33m" : "\x1b[32m";
const reset = "\x1b[0m";
console.log(`${color}${status}${reset} ${method} ${url} - ${ms}ms`);
}