tango-app-api-store-zone 3.3.1-beta.18 → 3.3.1-beta.19
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
|
@@ -525,6 +525,20 @@ export const tagging = async ( req, res ) => {
|
|
|
525
525
|
|
|
526
526
|
await externalService.create( data );
|
|
527
527
|
}
|
|
528
|
+
|
|
529
|
+
let cameraDetails = await cameraService.findOne( { _id: InputData.cameraId, streamName: InputData.streamName }, { productModule: 1 } );
|
|
530
|
+
if ( cameraDetails ) {
|
|
531
|
+
if ( !cameraDetails?.productModule.includes( 'tangoZone' ) ) {
|
|
532
|
+
cameraDetails.productModule.push( { productName: 'tangoZone', checked: true } );
|
|
533
|
+
cameraDetails.save();
|
|
534
|
+
} else {
|
|
535
|
+
let camIndex = cameraDetails.productModule.findIndex( ( ele ) => ele.productName == 'tangoZone' );
|
|
536
|
+
if ( !cameraDetails?.productModule?.[camIndex]?.checked ) {
|
|
537
|
+
cameraDetails.productModule[camIndex].checked = true;
|
|
538
|
+
cameraDetails.save();
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
528
542
|
await updatezoneTagging( req, res );
|
|
529
543
|
} catch ( e ) {
|
|
530
544
|
logger.error( { error: e, function: 'tagging' } );
|