1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-09-21 10:11:34 +02:00

fix request failiure with error code 400

This commit is contained in:
afeuerstein 2021-10-03 20:06:03 +02:00
parent 45b9800b5d
commit c745c765e0

View File

@ -47,7 +47,7 @@ export async function Authentication(req: Request, res: Response, next: NextFunc
req.token = decoded;
req.user_id = decoded.id;
req.user_bot = user.bot;
req.rights = new Rights(user.rights);
req.rights = new Rights(Number(user.rights));
return next();
} catch (error: any) {
return next(new HTTPError(error?.toString(), 400));