changes in view only

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

@ -252,7 +252,14 @@ fastify.post("/api/login", {
}; };
if (loginObject.isStaff) { 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) { if (profilePicture) {

Loading…
Cancel
Save