Issue fixed in change-password api

This commit is contained in:
Gowtham M 2026-07-08 10:50:30 +05:30
parent 36aff2dc4c
commit a68ca45abc
2 changed files with 2 additions and 2 deletions

View File

@ -227,7 +227,7 @@ exports.changeUserPassword = async (req, res) => {
}
// Find user
const user = await EstablishmentUser.findByPk(userId);
const user = await EstablishmentUser.scope("withSensitive").findByPk(userId);
if (!user) {
return res.status(404).send({
status: "failed",

View File

@ -137,7 +137,7 @@ exports.changeAdminUserPassword = async (req, res) => {
}
// Find user
const user = await User.findByPk(userId);
const user = await User.scope("withSensitive").findByPk(userId);
if (!user) {
return res.status(404).send({ status: "failed", message: "User not found" });
}