fix req.userid -> convert to bigint

This commit is contained in:
Flam3rboy 2021-02-17 18:24:40 +01:00
parent 8cd6190513
commit 0341fcf99c

View File

@ -22,7 +22,7 @@ export async function Authentication(req: Request, res: Response, next: NextFunc
const decoded: any = await checkToken(req.headers.authorization); const decoded: any = await checkToken(req.headers.authorization);
req.token = decoded; req.token = decoded;
req.userid = decoded.id; req.userid = BigInt(decoded.id);
return next(); return next();
} catch (error) { } catch (error) {
return next(new HTTPError(error.toString(), 400)); return next(new HTTPError(error.toString(), 400));