From 6a1e0594dc55e35c0846370ff6bc7a8bd55947de Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Mon, 8 Mar 2021 18:40:37 +0100 Subject: rename req.userid -> req.user_id --- src/middlewares/Authentication.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/middlewares/Authentication.ts') diff --git a/src/middlewares/Authentication.ts b/src/middlewares/Authentication.ts index 3d49d8e4..65d5a2cf 100644 --- a/src/middlewares/Authentication.ts +++ b/src/middlewares/Authentication.ts @@ -7,7 +7,7 @@ export const NO_AUTHORIZATION_ROUTES = ["/api/v8/auth/login", "/api/v8/auth/regi declare global { namespace Express { interface Request { - userid: any; + user_id: any; token: any; } } @@ -22,7 +22,7 @@ export async function Authentication(req: Request, res: Response, next: NextFunc const decoded: any = await checkToken(req.headers.authorization); req.token = decoded; - req.userid = BigInt(decoded.id); + req.user_id = BigInt(decoded.id); return next(); } catch (error) { return next(new HTTPError(error.toString(), 400)); -- cgit 1.5.1