Skip to content

Commit

Permalink
retain case updates
Browse files Browse the repository at this point in the history
  • Loading branch information
anjanaw committed Jan 22, 2024
1 parent c6aeb5b commit 87fc279
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/controllers/cbr_cycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ module.exports.retain = async (req, res) => {
const usecase = await Usecase.findById(req.params.id);
const contents = await Interaction.find({ usecase: req.params.id, usecase_version: usecase.version }, ['user', 'createdAt', 'usecase_version', 'interaction']).populate('user').populate('interaction').sort({ createdAt: "desc" });
const outcome = analyticsUtil.caseOutcome(contents);
console.log(outcome);
let responses = []
const all_mapping = await Promise.all(
await usecase.personas.map(async function (persona) {
Expand Down Expand Up @@ -608,7 +609,7 @@ function generateQueryObject(usecase, persona, intent) {

function generateCaseObject(usecase, persona, intent, outcome, solution) {
const a_case = {
"id": uuidv4(),
"id": v4(),
"Name": usecase.name + "-" + persona.details.name + "-" + intent.label,
"Version": usecase.version,
"DatasetType": usecase.settings.dataset_type,
Expand Down

0 comments on commit 87fc279

Please sign in to comment.