mirror of
https://github.com/spacebarchat/server.git
synced 2026-08-28 05:14:15 +00:00
fix req.userid -> convert to bigint
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user