|
|
|
@ -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;
|
|
|
|
|