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

@ -16,5 +16,7 @@ export const requireAuth = async (
return;
}
req.session = session;
next();
};