diff --git a/src/index.js b/src/index.js index cf1b1911..ac62951c 100644 --- a/src/index.js +++ b/src/index.js @@ -219,7 +219,7 @@ fastify.post("/api/login", { error: false, apiversion: fastify.config.APIVERSION, access_token: token, - buildingName:loginObject.buildingName, + buildingName:loginObject.user.buildingName, email: loginObject.user.emails, phone: loginObject.user.phone, customerId: loginObject.user.customerId, @@ -244,7 +244,7 @@ fastify.post("/api/login", { picture:profilePicture.picture, email: loginObject.user.emails, phone: loginObject.user.phone, - buildingName:loginObject.buildingName, + buildingName:loginObject.user.buildingName, customerId: loginObject.user.customerId, username: loginObject.user.username, address1: loginObject.user.profile.address1,