From e86935f2bf8bfb0ba7077f79c2ec6d76ccfcee10 Mon Sep 17 00:00:00 2001 From: afeuerstein <32029275+afeuerstein@users.noreply.github.com> Date: Sun, 3 Oct 2021 20:06:03 +0200 Subject: fix request failiure with error code 400 --- api/src/middlewares/Authentication.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api') 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)); -- cgit 1.4.1