diff --git a/generics/services/users.js b/generics/services/users.js index 4e3ea701..8e8441a4 100644 --- a/generics/services/users.js +++ b/generics/services/users.js @@ -26,7 +26,7 @@ const profile = function ( token,userId = "" ) { } }; - request.post(url,options,kendraCallback); + request.get(url,options,kendraCallback); function kendraCallback(err, data) { @@ -36,9 +36,11 @@ const profile = function ( token,userId = "" ) { if (err) { result.success = false; + console.log("error occured user read api call :",err) } else { let response = JSON.parse(data.body); + console.log("response from userRead api call :",response) if( response.status === httpStatusCode['ok'].status ) { result["data"] = response.result.response; } else { diff --git a/module/programs/helper.js b/module/programs/helper.js index 3d0a7cf4..32982532 100644 --- a/module/programs/helper.js +++ b/module/programs/helper.js @@ -1076,6 +1076,7 @@ module.exports = class ProgramsHelper { status: httpStatusCode.bad_request.status } } + console.log("kafka push status :",pushProgramUsersDetailsToKafka) if ( pushProgramUsersDetailsToKafka ) { joinProgram.programName = programData[0].name; joinProgram.programExternalId = programData[0].externalId; diff --git a/module/solutions/helper.js b/module/solutions/helper.js index 652c6378..78b2a22f 100644 --- a/module/solutions/helper.js +++ b/module/solutions/helper.js @@ -2008,7 +2008,7 @@ module.exports = class SolutionsHelper { _id : solutionData.programId },["rootOrganisations","requestForPIIConsent"]); - templateOrQuestionDetails.result.rootOrganisations = (programData[0].rootOrganisations) ? programData[0].rootOrganisations : []; + templateOrQuestionDetails.result.rootOrganisations = (programData[0].rootOrganisations) ? programData[0].rootOrganisations[0] : ""; templateOrQuestionDetails.result.requestForPIIConsent = (programData[0].requestForPIIConsent) ? programData[0].requestForPIIConsent : false; } diff --git a/module/users/helper.js b/module/users/helper.js index 60c010c7..24dbdd05 100644 --- a/module/users/helper.js +++ b/module/users/helper.js @@ -585,7 +585,7 @@ module.exports = class UsersHelper { programId: programId, programEndDate : programData[0].endDate, description: constants.common.TARGETED_SOLUTION_TEXT, - rootOrganisations : ( programData[0].rootOrganisations && programData[0].rootOrganisations.length > 0 ) ? programData[0].rootOrganisations : [], + rootOrganisations : ( programData[0].rootOrganisations && programData[0].rootOrganisations.length > 0 ) ? programData[0].rootOrganisations[0] : "", requestForPIIConsent: programData[0].requestForPIIConsent ? programData[0].requestForPIIConsent : false, data: mergedData, count: totalCount,