summary refs log tree commit diff
diff options
context:
space:
mode:
authorafeuerstein <32029275+afeuerstein@users.noreply.github.com>2021-10-03 20:06:03 +0200
committerafeuerstein <32029275+afeuerstein@users.noreply.github.com>2021-10-03 20:06:03 +0200
commitc745c765e0733751d62bd65c896860a83f26ccf3 (patch)
tree27f0a276a7ab09409e6e497a27603c5dd60924f6
parent:bug: fix registration (diff)
downloadserver-c745c765e0733751d62bd65c896860a83f26ccf3.tar.xz
fix request failiure with error code 400
-rw-r--r--api/src/middlewares/Authentication.ts2
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));