Skip to content
Snippets Groups Projects
Commit 2dae0bd0 authored by Matt Kirby's avatar Matt Kirby
Browse files

Fixed token stuff

parent 786fa833
No related branches found
No related tags found
1 merge request!18Fe search and friends (sorry in advance)
......@@ -5,7 +5,12 @@ import Config from '../../config'
export const SECRET_KEY: Secret = Config.JWT_SECRET;
export interface CustomJWTRequest extends Request {
token?: string | JwtPayload;
token?: string | JwtPayload | TokenData;
}
export type TokenData = {
userId: string,
username: string
}
export const authorize = async (req: Request, res: Response, next: NextFunction) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment