feat(api): attach session to request in requireAuth

- Add Express Request type augmentation for req.session
- requireAuth now sets req.session after session validation,
  so protected handlers can read the user without calling
  getSession again
- Add ConflictError (409) alongside existing AppError subclasses
This commit is contained in:
lila 2026-04-16 19:51:10 +02:00
parent cf56399a5e
commit 8c241636bf
3 changed files with 19 additions and 0 deletions

View file

@ -19,3 +19,9 @@ export class NotFoundError extends AppError {
super(message, 404);
}
}
export class ConflictError extends AppError {
constructor(message: string) {
super(message, 409);
}
}