Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Api's : Map newly created Observation to Program and Update any QuestionSet #83

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

aishwa8141
Copy link

No description provided.

Copy link
Collaborator

@aks30 aks30 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed on 21 July

.env.sample Outdated
DISABLE_LEARNER_SERVICE_ON_OFF = "ON" // Disable learner service check

DOCK_URL = "https://dock.sunbirded.org"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aishwa8141 Add comments along side with the explanation about what this key is used for

return new Promise(async (resolve, reject) => {
try {
let status;
console.log("programId", programId, copyReq, questionSetId)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aishwa8141 Please remove all console log statements

}
console.log(" database.model", programData)
const copyQuestionSetUrl = kpServiceUrl + messageConstants.endpoints.COPY_QUESTION_SET + "/" + questionSetId;
const headers = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aishwa8141 Please service folder inside generics for all external service calls - https://github.com/shikshalokam/ml-survey-service/tree/master/generics/services

}
// return resolve(data.body);
}
var readQuestionSetRes = {};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aishwa8141 use let and const not var

}
}

function updateQuestionSetHierarchyCallBack(err, data) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aishwa8141 make all these as different functions within this helper itself and not function inside a function.

* @param {Object} req - requested data.
* @returns {JSON} -
*/
async updateMapObservation(req) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aks30 these new Api is calling update question set and publish question set API's and updating mongo object
And in the existing API requires solutionExternalId

.env.sample Outdated
DISABLE_LEARNER_SERVICE_ON_OFF = "ON" // Disable learner service check

DOCK_URL = "https://dock.sunbirded.org"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aishwa8141 If we can rename it to CREATION_PORTAL_URL for this and below key as well

}
const options = {
headers,
json: true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aishwa8141 We cannot have 2 keys with same name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants