diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-03 20:20:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-03 20:20:50 +0200 |
commit | 4ef0a88f84b957172529cd4145c5f6d16dd7b91d (patch) | |
tree | 27f0a276a7ab09409e6e497a27603c5dd60924f6 /api | |
parent | :bug: fix registration (diff) | |
parent | fix request failiure with error code 400 (diff) | |
download | server-4ef0a88f84b957172529cd4145c5f6d16dd7b91d.tar.xz |
Merge pull request #411 from afeuerstein/master
Diffstat (limited to 'api')
-rw-r--r-- | api/src/middlewares/Authentication.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/api/src/middlewares/Authentication.ts b/api/src/middlewares/Authentication.ts index 571097bf..5a082751 100644 --- a/api/src/middlewares/Authentication.ts +++ b/api/src/middlewares/Authentication.ts @@ -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)); |