Initial commit: Activiteiten Inventaris applicatie

This commit is contained in:
2026-01-06 01:23:45 +01:00
commit 6d26aea0cf
38 changed files with 9818 additions and 0 deletions

10
server/middleware/auth.ts Normal file
View File

@@ -0,0 +1,10 @@
import { Request, Response, NextFunction } from 'express';
export function requireAuth(req: Request, res: Response, next: NextFunction): void {
if (req.session && req.session.user) {
next();
} else {
res.status(401).json({ error: 'Authenticatie vereist' });
}
}