tango-app-api-store-zone 3.3.1-beta.1 → 3.3.1-beta.3
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-zone",
|
|
3
|
-
"version": "3.3.1-beta.
|
|
3
|
+
"version": "3.3.1-beta.3",
|
|
4
4
|
"description": "zone",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"mongodb": "^6.5.0",
|
|
22
22
|
"nodemon": "^3.1.0",
|
|
23
23
|
"swagger-ui-express": "^5.0.0",
|
|
24
|
-
"tango-api-schema": "^2.1.
|
|
25
|
-
"tango-app-api-middleware": "^3.1.
|
|
24
|
+
"tango-api-schema": "^2.1.58",
|
|
25
|
+
"tango-app-api-middleware": "^3.1.43-alpha.6",
|
|
26
26
|
"winston": "^3.13.0",
|
|
27
27
|
"winston-daily-rotate-file": "^5.0.0"
|
|
28
28
|
},
|
|
@@ -173,7 +173,6 @@ export const tagging = async ( req, res ) => {
|
|
|
173
173
|
} );
|
|
174
174
|
let taggingDetails = await taggingService.findOne( { clientId: InputData.clientId, storeId: InputData.storeId, cameraId: InputData.cameraId, tagName: InputData.tagName, isDeleted: false } );
|
|
175
175
|
|
|
176
|
-
const previousTagging = await taggingService.findOne( { clientId: InputData.clientId, storeId: InputData.storeId, tagName: InputData.tagName } );
|
|
177
176
|
if ( !taggingDetails ) {
|
|
178
177
|
const logObj = {
|
|
179
178
|
clientId: InputData.clientId,
|
|
@@ -188,12 +187,12 @@ export const tagging = async ( req, res ) => {
|
|
|
188
187
|
showTo: [ 'client', 'tango' ],
|
|
189
188
|
};
|
|
190
189
|
insertOpenSearchData( JSON.parse( process.env.OPENSEARCH )?.activityLog, logObj );
|
|
191
|
-
if (
|
|
192
|
-
InputData = { ...InputData, rgbColor:
|
|
190
|
+
if ( InputData.coordinates[0].color ) {
|
|
191
|
+
InputData = { ...InputData, rgbColor: InputData.coordinates[0].color };
|
|
193
192
|
}
|
|
194
193
|
|
|
195
|
-
if (
|
|
196
|
-
InputData = { ...InputData, rgbBorderColor:
|
|
194
|
+
if ( InputData.coordinates[0].rgbBorderColor ) {
|
|
195
|
+
InputData = { ...InputData, rgbBorderColor: InputData.coordinates[0].rgbBorderColor };
|
|
197
196
|
}
|
|
198
197
|
let response = await taggingService.create( InputData );
|
|
199
198
|
await taggingService.deleteOne( { clientId: InputData.clientId, storeId: InputData.storeId, cameraId: { $exists: false }, tagName: InputData.tagName } );
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
import express from 'express';
|
|
4
|
-
import { isAllowedSessionHandler, validate,
|
|
4
|
+
import { isAllowedSessionHandler, validate, accessVerification } from 'tango-app-api-middleware';
|
|
5
5
|
import * as validation from '../dtos/validation.dtos.js';
|
|
6
6
|
import * as tagController from '../controllers/zoneTagging.controller.js';
|
|
7
7
|
|
|
8
8
|
export const zoneTaggingRouter = express.Router();
|
|
9
9
|
|
|
10
|
-
zoneTaggingRouter.post( '/addCustomTag', isAllowedSessionHandler,
|
|
11
|
-
zoneTaggingRouter.get( '/customTagList', isAllowedSessionHandler,
|
|
12
|
-
zoneTaggingRouter.post( '/tagging', isAllowedSessionHandler,
|
|
13
|
-
zoneTaggingRouter.get( '/cameraList', isAllowedSessionHandler,
|
|
14
|
-
zoneTaggingRouter.post( '/updateCustomTag', isAllowedSessionHandler,
|
|
15
|
-
zoneTaggingRouter.post( '/deleteCustomTag', isAllowedSessionHandler,
|
|
16
|
-
zoneTaggingRouter.get( '/getCameraTagging', isAllowedSessionHandler,
|
|
17
|
-
zoneTaggingRouter.get( '/getZoneTagging', isAllowedSessionHandler,
|
|
18
|
-
zoneTaggingRouter.post( '/updatezoneTagging', isAllowedSessionHandler,
|
|
19
|
-
zoneTaggingRouter.post( '/deleteZoneTag', isAllowedSessionHandler,
|
|
10
|
+
zoneTaggingRouter.post( '/addCustomTag', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoEye', name: 'ZoneTag', permissions: [ 'isAdd' ] } ] } ), validate( validation.validateAddTagParams ), tagController.addCustomTag );
|
|
11
|
+
zoneTaggingRouter.get( '/customTagList', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoEye', name: 'ZoneTag', permissions: [ ] } ] } ), validate( validation.validateTagParams ), tagController.customTagList );
|
|
12
|
+
zoneTaggingRouter.post( '/tagging', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoEye', name: 'ZoneTag', permissions: [ 'isEdit' ] } ] } ), validate( validation.validateTaggingParams ), tagController.tagging );
|
|
13
|
+
zoneTaggingRouter.get( '/cameraList', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoEye', name: 'ZoneTag', permissions: [ ] } ] } ), validate( validation.validateTagParams ), tagController.getCameraList );
|
|
14
|
+
zoneTaggingRouter.post( '/updateCustomTag', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoEye', name: 'ZoneTag', permissions: [ 'isEdit' ] } ] } ), validate( validation.validateUpdateTagParams ), tagController.updateTag );
|
|
15
|
+
zoneTaggingRouter.post( '/deleteCustomTag', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoEye', name: 'ZoneTag', permissions: [ 'isEdit' ] } ] } ), validate( validation.validateDeleteTagParams ), tagController.deleteTag );
|
|
16
|
+
zoneTaggingRouter.get( '/getCameraTagging', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoEye', name: 'ZoneTag', permissions: [ ] } ] } ), validate( validation.validateCameraTagParams ), tagController.getCameraTagging );
|
|
17
|
+
zoneTaggingRouter.get( '/getZoneTagging', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoEye', name: 'ZoneTag', permissions: [ ] } ] } ), validate( validation.validateZonetagParams ), tagController.getZoneList );
|
|
18
|
+
zoneTaggingRouter.post( '/updatezoneTagging', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoEye', name: 'ZoneTag', permissions: [ 'isEdit' ] } ] } ), validate( validation.validateCamZonetagParams ), tagController.updatezoneTagging );
|
|
19
|
+
zoneTaggingRouter.post( '/deleteZoneTag', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoEye', name: 'ZoneTag', permissions: [ 'isEdit' ] } ] } ), validate( validation.updateCoordinatesParams ), tagController.deletezoneTagging );
|
|
20
20
|
|
|
21
21
|
zoneTaggingRouter.get( '/updateOldZone', tagController.updateOldData );
|
|
22
22
|
|