tango-app-api-trax 3.7.25 → 3.7.26

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-trax",
3
- "version": "3.7.25",
3
+ "version": "3.7.26",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -86,7 +86,7 @@ export async function storeListv1( req, res ) {
86
86
  );
87
87
 
88
88
  let storeIdList = allStores.map( ( item ) => item.store_id );
89
- if ( req.body.assignedStores.length ) {
89
+ if ( req.body?.assignedStores?.length ) {
90
90
  storeIdList = [ ...storeIdList, ...req.body.assignedStores ];
91
91
  }
92
92
  let storeStatus = await storeService.find( { storeId: { $in: storeIdList }, status: 'active' }, { storeId: 1, storeName: 1 } );
@@ -98,6 +98,7 @@ export async function storeListv1( req, res ) {
98
98
 
99
99
  return res.sendSuccess( storeStatus );
100
100
  } catch ( e ) {
101
+ console.log( e );
101
102
  logger.error( { function: 'storeListv1', error: e, body: req.body } );
102
103
  return res.sendError( e, 500 );
103
104
  }