Skip to content

Commit

Permalink
testing retain
Browse files Browse the repository at this point in the history
  • Loading branch information
anjanaw committed Jan 25, 2024
1 parent 4d35a91 commit 3a89764
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/controllers/cbr_cycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ module.exports.retain = async (req, res) => {
};

const response = await axios(config);
responses.push(response);
responses.push(response.data);
}));
}));

Expand Down Expand Up @@ -610,6 +610,7 @@ function generateQueryObject(usecase, persona, intent) {
}

function generateCaseObject(usecase, persona, intent, outcome, solution) {
let outcome_status = outcome == {} ? "http://www.w3id.org/iSeeOnto/explanationexperience#Not_Evaluated" : "http://www.w3id.org/iSeeOnto/explanationexperience#Evaluated";
const a_case = {
"id": v4().replace(/-/g, ''),
"Name": "http://www.w3id.org/iSeeOnto/explanationexperience#"+usecase.name.split(" ").join("")+ "" + persona.details.name + "" + intent.label,
Expand All @@ -631,7 +632,7 @@ function generateCaseObject(usecase, persona, intent, outcome, solution) {
"UserQuestion": intent.questions.map(t => t.text),
"UserQuestionTarget": intent.questions.map(t => t.target),
"Solution": solution.data,
"Status": outcome ? "http://www.w3id.org/iSeeOnto/explanationexperience#Evaluated" : "http://www.w3id.org/iSeeOnto/explanationexperience#Not_Evaluated",
"Status": outcome_status,
"Outcome": outcome,
};
return a_case;
Expand Down

0 comments on commit 3a89764

Please sign in to comment.