Skip to content

Commit

Permalink
KB-4794 fix for status values
Browse files Browse the repository at this point in the history
  • Loading branch information
karthik-tarento committed May 31, 2024
1 parent ae2c8ac commit 25b1aa2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/protectedApi_v8/user/profile-details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ const failedToUpdateUser = 'Failed to update user profile data.'
const unknownError = 'Failed due to unknown reason'
const failedToCheckMDOLeader = 'Failed to check MDO_LEADER role exist.'
const errorMDOLeaderExist = 'MDO_LDEADER already exist in org. Can not add another MDO_LEADER.'
const verifiedStatus = 'VERIFIED'
const notVerifiedStatus = 'NOT-VERIFIED'

// tslint:disable-next-line: all
profileDeatailsApi.post('/createUser', async (req, res) => {
Expand Down Expand Up @@ -377,6 +379,9 @@ profileDeatailsApi.post('/createUser', async (req, res) => {
phoneVerified: sbphoneVerified_,
primaryEmail: sbemail_,
},
profileDesignationStatus: notVerifiedStatus,
profileGroupStatus: notVerifiedStatus,
profileStatus: notVerifiedStatus,
},
userId: sbUserId,
}
Expand Down Expand Up @@ -431,11 +436,10 @@ profileDeatailsApi.post('/createUser', async (req, res) => {
sbProfileUpdateReq.profileDetails[additionalPropertiesPropertyName] = objAdditionalProperties
}

const profileStatusPropertyName = 'profileStatus'
if ((sbdesignation_ !== undefined && sbdesignation_ !== '') && (sbgroup_ !== undefined && sbgroup_ !== '')) {
sbProfileUpdateReq.profileDetails[profileStatusPropertyName] = 'VERIFIED'
} else {
sbProfileUpdateReq.profileDetails[profileStatusPropertyName] = 'NOT-VERIFIED'
sbProfileUpdateReq.profileDetails.profileStatus = verifiedStatus
sbProfileUpdateReq.profileDetails.profileGroupStatus = verifiedStatus
sbProfileUpdateReq.profileDetails.profileDesignationStatus = verifiedStatus
}
const sbUserProfileUpdateResp = await axios({
...axiosRequestConfig,
Expand Down

0 comments on commit 25b1aa2

Please sign in to comment.