changes in view only

master^2
Varun 7 months ago
parent c6055ac5ca
commit 5d3ecf6429

@ -252,8 +252,15 @@ fastify.post("/api/login", {
};
if (loginObject.isStaff) {
responsePayload.simplydata.all_motor_access = loginObject.staffMember.all_motor_access;
}
let allMotorAccess = loginObject.staffMember.all_motor_access;
// Normalize the value if it matches the given variations
if (["view", "view only", "View", "View Only"].includes(allMotorAccess)) {
allMotorAccess = "view";
}
responsePayload.simplydata.all_motor_access = allMotorAccess;
}
if (profilePicture) {
responsePayload.simplydata.picture = profilePicture.picture;

Loading…
Cancel
Save