Files
sct-overseerr/server/types/express.d.ts
sct 5343f35e5b 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
2020-08-28 09:34:15 +09:00

22 lines
493 B
TypeScript

/* 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;