summary refs log tree commit diff
path: root/src/middlewares/Authentication.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-03-08 18:40:37 +0100
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-03-08 18:40:37 +0100
commit6a1e0594dc55e35c0846370ff6bc7a8bd55947de (patch)
treec91af4f69633a091b604a7ebd2b26a82a007fba5 /src/middlewares/Authentication.ts
parent:sparkles: Schema (diff)
downloadserver-6a1e0594dc55e35c0846370ff6bc7a8bd55947de.tar.xz
rename req.userid -> req.user_id
Diffstat (limited to 'src/middlewares/Authentication.ts')
-rw-r--r--src/middlewares/Authentication.ts4
1 files changed, 2 insertions, 2 deletions
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));