Skip to content
Snippets Groups Projects

Cherry-pick admin capabilities from SLS

Merged Ghost User requested to merge admin-cherry into main
7 files
+ 9
32
Compare changes
  • Side-by-side
  • Inline
Files
7
@@ -106,7 +106,7 @@ exports.updateUserPermissions = async (req, res) => {
};
exports.getAllEmailAddressesForEditors = async () => {
const condition = {get_emails_editor: {[Op.eq]: true}};
const condition = { get_emails_editor: { [Op.eq]: true } };
return User.findAll({
where: condition,
attributes: ["email"],
@@ -135,9 +135,6 @@ exports.updateUserVerification = async (req, res) => {
res.status(responseStatusCodes.InternalServerError).send({
message: err.message || "Error updating User"
});
<<<<<<< HEAD
});
=======
}
);
};
@@ -160,25 +157,6 @@ exports.updateUserTeam = async (req, res) => {
);
};
exports.getAllEmailAddressesForEditors = async () => {
const condition = { get_emails_editor: { [Op.eq]: true } };
return User.findAll({
where: condition,
attributes: ["email"],
raw: true,
}).then(data => {
data = data.map((user) => user.email);
return data;
}
).catch(err => {
logger.error(err.message);
return null;
});
>>>>>>> daa8f84 (Admin-Tool v3)
};
function updateUser(user_id, user_data){
return User.update(user_data, { where: { user_id: { [Op.eq]: user_id } } });
}
Loading