-
Notifications
You must be signed in to change notification settings - Fork 11
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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" |
There was a problem hiding this comment.
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
module/programs/helper.js
Outdated
return new Promise(async (resolve, reject) => { | ||
try { | ||
let status; | ||
console.log("programId", programId, copyReq, questionSetId) |
There was a problem hiding this comment.
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
module/programs/helper.js
Outdated
} | ||
console.log(" database.model", programData) | ||
const copyQuestionSetUrl = kpServiceUrl + messageConstants.endpoints.COPY_QUESTION_SET + "/" + questionSetId; | ||
const headers = { |
There was a problem hiding this comment.
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
module/programs/helper.js
Outdated
} | ||
// return resolve(data.body); | ||
} | ||
var readQuestionSetRes = {}; |
There was a problem hiding this comment.
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
module/programs/helper.js
Outdated
} | ||
} | ||
|
||
function updateQuestionSetHierarchyCallBack(err, data) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aishwa8141 instead of new API can we use update API in https://github.com/shikshalokam/ml-survey-service/blob/master/controllers/v1/solutionsController.js
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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
generics/services/questionset.js
Outdated
} | ||
const options = { | ||
headers, | ||
json: true, |
There was a problem hiding this comment.
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.
No description provided.