summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-17 18:24:40 +0100
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-17 18:24:40 +0100
commit0341fcf99c231924c128709ac037d66a6fa9d513 (patch)
treed5cd5df74754b8d9221e14665fb6c896ea6614f8
parent:art: show proper auth error (diff)
downloadserver-0341fcf99c231924c128709ac037d66a6fa9d513.tar.xz
fix req.userid -> convert to bigint
-rw-r--r--src/middlewares/Authentication.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/middlewares/Authentication.ts b/src/middlewares/Authentication.ts

index 40ada88e..e7650684 100644 --- a/src/middlewares/Authentication.ts +++ b/src/middlewares/Authentication.ts
@@ -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 = decoded.id; + req.userid = BigInt(decoded.id); return next(); } catch (error) { return next(new HTTPError(error.toString(), 400));