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:
parent
cf56399a5e
commit
8c241636bf
3 changed files with 19 additions and 0 deletions
|
|
@ -19,3 +19,9 @@ export class NotFoundError extends AppError {
|
|||
super(message, 404);
|
||||
}
|
||||
}
|
||||
|
||||
export class ConflictError extends AppError {
|
||||
constructor(message: string) {
|
||||
super(message, 409);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue