tango-app-api-infra 3.0.74-dev → 3.0.75-dev
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-infra",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.75-dev",
|
|
4
4
|
"description": "infra",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"mongodb": "^6.4.0",
|
|
27
27
|
"nodemon": "^3.1.0",
|
|
28
28
|
"tango-api-schema": "^2.0.100",
|
|
29
|
-
"
|
|
29
|
+
"swagger-ui-express": "^5.0.0",
|
|
30
|
+
"tango-app-api-middleware": "^1.0.68-dev",
|
|
30
31
|
"winston": "^3.12.0",
|
|
31
32
|
"winston-daily-rotate-file": "^5.0.0"
|
|
32
33
|
},
|
|
@@ -762,28 +762,24 @@ export async function getInfraIssues( req, res ) {
|
|
|
762
762
|
{
|
|
763
763
|
$match: {
|
|
764
764
|
$and: [
|
|
765
|
-
|
|
766
|
-
|
|
765
|
+
{ isUp: { $eq: true } },
|
|
766
|
+
{ isActivated: { $eq: true } },
|
|
767
767
|
{ storeId: inputData.storeId },
|
|
768
768
|
],
|
|
769
769
|
},
|
|
770
770
|
},
|
|
771
|
-
{
|
|
772
|
-
$group: {
|
|
773
|
-
_id: null,
|
|
774
|
-
streams: { $push: '$streamName' },
|
|
775
|
-
},
|
|
776
|
-
},
|
|
777
771
|
{
|
|
778
772
|
$project: {
|
|
779
773
|
_id: 0,
|
|
780
|
-
|
|
774
|
+
streamName: 1,
|
|
775
|
+
cameraNumber: 1,
|
|
776
|
+
thumbnailImage: await signedUrl( { Bucket: appConfig.cloud.aws.bucket.baseImage, file_path: '$thumbnailImage' } ),
|
|
781
777
|
},
|
|
782
778
|
},
|
|
783
779
|
];
|
|
784
780
|
const camera = await aggregateCamera( camQuery );
|
|
785
781
|
logger.info( { message: camera } );
|
|
786
|
-
return res.sendSuccess( { result: mergeValue, streams: camera
|
|
782
|
+
return res.sendSuccess( { result: mergeValue, streams: camera } );
|
|
787
783
|
} catch ( error ) {
|
|
788
784
|
logger.error( { error: error, function: 'getInfraIssues' } );
|
|
789
785
|
return res.sendError( error, 500 );
|
|
@@ -1455,7 +1451,14 @@ export async function assignTicket( req, res ) {
|
|
|
1455
1451
|
}
|
|
1456
1452
|
export async function storeFilter( req, res ) {
|
|
1457
1453
|
try {
|
|
1458
|
-
|
|
1454
|
+
const inputData = req.body;
|
|
1455
|
+
let query = { 'issueType': inputData.issueType, 'basicDetails.clientId': inputData.clientId, 'basicDetails.storeId': { $exists: true } };
|
|
1456
|
+
if ( inputData.issueType == 'dataMismatch' ) {
|
|
1457
|
+
query ={
|
|
1458
|
+
'issueType': { '$in': [ 'highcount', 'lowcount' ] }, 'basicDetails.clientId': inputData.clientId, 'basicDetails.storeId': { $exists: true },
|
|
1459
|
+
};
|
|
1460
|
+
}
|
|
1461
|
+
let stores = await findTangoTicket( query, { 'basicDetails.storeId': 1 } );
|
|
1459
1462
|
const uniqueStoreIds = [ ...new Set( stores.map( ( store ) => store.basicDetails.storeId ) ) ];
|
|
1460
1463
|
const uniqueStoreObjects = uniqueStoreIds.map( ( storeId ) => ( { 'storeId': storeId } ) );
|
|
1461
1464
|
|