From 0341fcf99c231924c128709ac037d66a6fa9d513 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Wed, 17 Feb 2021 18:24:40 +0100 Subject: [PATCH] fix req.userid -> convert to bigint --- src/middlewares/Authentication.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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));