tango-app-api-trax 3.5.0-alpha-4 → 3.5.0-alpha-5
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
|
@@ -2325,16 +2325,14 @@ export async function getLiveChecklistClients( req, res ) {
|
|
|
2325
2325
|
},
|
|
2326
2326
|
},
|
|
2327
2327
|
},
|
|
2328
|
-
{
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
},
|
|
2332
|
-
},
|
|
2328
|
+
{ $group: { _id: '$client_id' } },
|
|
2329
|
+
{ $sort: { _id: 1 } },
|
|
2330
|
+
{ $group: { _id: null, client_ids: { $push: '$_id' } } },
|
|
2333
2331
|
];
|
|
2334
2332
|
|
|
2335
2333
|
let getchecklistsData = await CLconfig.aggregate( query );
|
|
2336
2334
|
if ( getchecklistsData && getchecklistsData.length >0 ) {
|
|
2337
|
-
return res.sendSuccess( { liveChecklistClients: getchecklistsData } );
|
|
2335
|
+
return res.sendSuccess( { liveChecklistClients: getchecklistsData[0].client_ids } );
|
|
2338
2336
|
} else {
|
|
2339
2337
|
return res.sendError( 'Checklist Not Available', 204 );
|
|
2340
2338
|
}
|