Bud fixed - Super Admin restrictions

This commit is contained in:
unknown 2025-11-29 22:02:04 +05:30
parent 950f1f6d3f
commit 14da0fb727

View File

@ -60,6 +60,12 @@ exports.updateUser = async (req, res) => {
try {
const { name, email,is_active } = req.body;
if (email === 'bhavinkumar.chandulal@fcsc.gov.ae') {
return res.status(403).json({
status: "error",
message: "You cannot modify Super Admin data."
});
}
const [updated] = await User.update({ name, email, is_active}, { where: { id: req.params.id } });
if (updated) {