mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
feat(api): initial implementation of the auth system (#30)
Adds the auth system but does not add all required features. They will be handled in other tickets
This commit is contained in:
21
server/types/express.d.ts
vendored
Normal file
21
server/types/express.d.ts
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import type { NextFunction, Request, Response } from 'express';
|
||||
import type { User } from '../entity/User';
|
||||
|
||||
declare global {
|
||||
namespace Express {
|
||||
export interface Session {
|
||||
userId?: number;
|
||||
}
|
||||
|
||||
export interface Request {
|
||||
user?: User;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export type Middleware = <ParamsDictionary, any, any>(
|
||||
req: Request,
|
||||
res: Response,
|
||||
next: NextFunction
|
||||
) => Promise<void | NextFunction> | void | NextFunction;
|
Reference in New Issue
Block a user