tango-app-api-store-builder 1.0.0-beta-186 → 1.0.0-beta-187

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-app-api-store-builder",
3
- "version": "1.0.0-beta-186",
3
+ "version": "1.0.0-beta-187",
4
4
  "description": "storeBuilder",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -79,6 +79,8 @@ export async function updateTemplate( req, res ) {
79
79
  let checkstoreMapped = await storeFixtureService.findOne( { fixtureConfigId: req.params.templateId } );
80
80
  if ( checkstoreMapped ) {
81
81
  inputData.isEdited = true;
82
+ } else {
83
+ inputData.isEdited = false;
82
84
  }
83
85
  await fixtureConfigService.updateOne( { _id: req.params.templateId }, inputData );
84
86
  return res.sendSuccess( 'Fixture template details updated successfully' );
@@ -1052,10 +1052,18 @@ export async function getRolloutFeedback( req, res ) {
1052
1052
 
1053
1053
  resultMap[type] = data;
1054
1054
 
1055
+ let taskId = [];
1056
+ if ( req.body.taskId ) {
1057
+ taskId.push( new mongoose.Types.ObjectId( req.body.taskId ) );
1058
+ }
1059
+ if ( req.body.refTaskId ) {
1060
+ taskId.push( new mongoose.Types.ObjectId( req.body.refTaskId ) );
1061
+ }
1062
+
1055
1063
  const comments = await planoGlobalCommentService.find( {
1056
1064
  planoId: new mongoose.Types.ObjectId( req.body.planoId ),
1057
1065
  floorId: new mongoose.Types.ObjectId( req.body.floorId ),
1058
- taskId: { $in: [ new mongoose.Types.ObjectId( req.body.taskId ), new mongoose.Types.ObjectId( req.body.req.body.refTaskId ) ] },
1066
+ ...( taskId.length && { taskId: { $in: taskId } } ),
1059
1067
  taskType: type,
1060
1068
  } );
1061
1069
  commentMap[type] = comments;