Clean isManager

This commit is contained in:
Felix Albrigtsen 2022-04-24 13:41:55 +02:00
parent db13a49ba9
commit a042a59276
2 changed files with 1 additions and 7 deletions

View File

@ -504,7 +504,7 @@ api.post("/users/createBlank", async (req, res) => {
}); });
api.post("/users/changeManagerStatus", 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"}); res.json({"status": "error", "data": "Not authorized"});
return return
} }

View File

@ -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 // #endregion