Skip to content

Commit

Permalink
Merge pull request #115 from shikshalokam/master
Browse files Browse the repository at this point in the history
user profile api method change
  • Loading branch information
aks30 committed May 4, 2023
2 parents 9714a47 + c575ea7 commit f5d114d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion generics/services/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const profile = function ( token,userId = "" ) {
}
};

request.post(url,options,kendraCallback);
request.get(url,options,kendraCallback);

function kendraCallback(err, data) {

Expand All @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions module/programs/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion module/solutions/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion module/users/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f5d114d

Please sign in to comment.