|
|
@ -202,7 +202,7 @@ fastify.post("/api/login", {
|
|
|
|
simplydata: {
|
|
|
|
simplydata: {
|
|
|
|
error: false,
|
|
|
|
error: false,
|
|
|
|
phoneVerified: false,
|
|
|
|
phoneVerified: false,
|
|
|
|
phone: user.phone,
|
|
|
|
phone: loginObject.isStaff ? loginObject.staffMember.phone : user.phone,
|
|
|
|
oneTimePasswordSetFlag,
|
|
|
|
oneTimePasswordSetFlag,
|
|
|
|
message: "Please Verify your phone number",
|
|
|
|
message: "Please Verify your phone number",
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -214,7 +214,7 @@ fastify.post("/api/login", {
|
|
|
|
simplydata: {
|
|
|
|
simplydata: {
|
|
|
|
error: false,
|
|
|
|
error: false,
|
|
|
|
phoneVerified,
|
|
|
|
phoneVerified,
|
|
|
|
phone: user.phone,
|
|
|
|
phone: loginObject.isStaff ? loginObject.staffMember.phone : user.phone,
|
|
|
|
oneTimePasswordSetFlag: true,
|
|
|
|
oneTimePasswordSetFlag: true,
|
|
|
|
message: "Password must be reset",
|
|
|
|
message: "Password must be reset",
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -237,7 +237,7 @@ fastify.post("/api/login", {
|
|
|
|
access_token: token,
|
|
|
|
access_token: token,
|
|
|
|
buildingName: user.buildingName,
|
|
|
|
buildingName: user.buildingName,
|
|
|
|
email: user.emails,
|
|
|
|
email: user.emails,
|
|
|
|
phone: user.phone,
|
|
|
|
phone: loginObject.isStaff ? loginObject.staffMember.phone : user.phone,
|
|
|
|
customerId: user.customerId,
|
|
|
|
customerId: user.customerId,
|
|
|
|
username: loginObject.isStaff ? loginObject.staffMember.name : user.username,
|
|
|
|
username: loginObject.isStaff ? loginObject.staffMember.name : user.username,
|
|
|
|
address1: user.profile.address1,
|
|
|
|
address1: user.profile.address1,
|
|
|
@ -251,7 +251,10 @@ fastify.post("/api/login", {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (loginObject.isStaff) {
|
|
|
|
|
|
|
|
responsePayload.simplydata.all_motor_access = loginObject.staffMember.all_motor_access;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (profilePicture) {
|
|
|
|
if (profilePicture) {
|
|
|
|
responsePayload.simplydata.picture = profilePicture.picture;
|
|
|
|
responsePayload.simplydata.picture = profilePicture.picture;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -263,6 +266,7 @@ fastify.post("/api/login", {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fastify.post("/api/installotplogin", {
|
|
|
|
fastify.post("/api/installotplogin", {
|
|
|
|
schema: {
|
|
|
|
schema: {
|
|
|
|
description: "This is for Login Otp Installation",
|
|
|
|
description: "This is for Login Otp Installation",
|
|
|
|