diff --git a/src/server/index.js b/src/server/index.js index b36df84..b8ccb1f 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -504,7 +504,7 @@ api.post("/users/createBlank", async (req, res) => { }); api.post("/users/changeManagerStatus", async (req, res) => { - if (!await isManager(req.session)) { + if (!(await isManager(req.session))) { res.json({"status": "error", "data": "Not authorized"}); return } diff --git a/src/server/tmdb.js b/src/server/tmdb.js index c825d1c..93b71e5 100644 --- a/src/server/tmdb.js +++ b/src/server/tmdb.js @@ -556,10 +556,4 @@ function editUser(email, user) { }); } -function userIsManager(userId) { - getUser(userId) - .then(user => { return user.isManager; }) - .catch(err => { console.log(err); return false; }); -} - // #endregion \ No newline at end of file