|
|
|
@ -279,9 +279,9 @@ fastify.post("/api/login", {
|
|
|
|
|
|
|
|
|
|
fastify.post("/api/installotplogin", {
|
|
|
|
|
schema: {
|
|
|
|
|
description: "This is for Login Otp Boy",
|
|
|
|
|
description: "This is for Login Otp Installation",
|
|
|
|
|
tags: ["Install"],
|
|
|
|
|
summary: "This is for Login Otp Boy",
|
|
|
|
|
summary: "This is for Login Otp Installation",
|
|
|
|
|
body: {
|
|
|
|
|
type: "object",
|
|
|
|
|
required: ["phone", "phoneVerificationCode"],
|
|
|
|
@ -340,7 +340,7 @@ fastify.post("/api/installotplogin", {
|
|
|
|
|
} else {
|
|
|
|
|
const token = fastify.jwt.sign(
|
|
|
|
|
{
|
|
|
|
|
name: user.name,
|
|
|
|
|
firstName: user.firstName,
|
|
|
|
|
},
|
|
|
|
|
{ expiresIn: "30d" }
|
|
|
|
|
);
|
|
|
|
@ -348,7 +348,7 @@ fastify.post("/api/installotplogin", {
|
|
|
|
|
const profilePicture = await ProfilePictureInstall.findOne({
|
|
|
|
|
customerId: user._id,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
console.log(user)
|
|
|
|
|
const responsePayload = {
|
|
|
|
|
simplydata: {
|
|
|
|
|
error: false,
|
|
|
|
@ -356,9 +356,9 @@ fastify.post("/api/installotplogin", {
|
|
|
|
|
access_token: token,
|
|
|
|
|
email: user.emails,
|
|
|
|
|
phone: user.phone,
|
|
|
|
|
name: user.name,
|
|
|
|
|
address1: user.profile.address1,
|
|
|
|
|
address2: user.profile.address2,
|
|
|
|
|
//name: user.name,
|
|
|
|
|
address1: user.address1,
|
|
|
|
|
address2: user.address2,
|
|
|
|
|
phoneVerified: user.phoneVerified,
|
|
|
|
|
oneTimePasswordSetFlag: user.oneTimePasswordSetFlag,
|
|
|
|
|
type: user.profile.role,
|
|
|
|
@ -368,6 +368,7 @@ fastify.post("/api/installotplogin", {
|
|
|
|
|
manager: user.manager,
|
|
|
|
|
firstName: user.firstName,
|
|
|
|
|
lastName: user.lastName,
|
|
|
|
|
address: user.address,
|
|
|
|
|
alternativeNumber: user.alternativeNumber,
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|