1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-11 05:02:37 +01:00

Merge pull request #411 from afeuerstein/master

This commit is contained in:
Flam3rboy 2021-10-03 20:20:50 +02:00 committed by GitHub
commit fc7fc0b7f7

View File

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