tango-app-api-infra 3.8.2 → 3.8.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-infra",
3
- "version": "3.8.2",
3
+ "version": "3.8.3",
4
4
  "description": "infra",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -547,7 +547,7 @@ export async function getTickets( req, res ) {
547
547
  const revCount = inputData?.revopsType ? geteRevDataCount?.body?.aggregations?.totalCount?.value : 0;
548
548
  const count = geteDataCount?.body?.count;
549
549
  if ( !geteDataCount || count == 0 ) {
550
- if ( inputData.storeId?.length > 0 ) {
550
+ if ( inputData.storeId?.length === 1 ) {
551
551
  const getStoreName = await findOneStore( { storeId: inputData.storeId }, { storeName: 1 } );
552
552
  return res.sendError( `No Pending items in the selected dates for the store ${getStoreName?.storeName || ''}`, 400 );
553
553
  }
@@ -569,7 +569,7 @@ export async function getTickets( req, res ) {
569
569
 
570
570
  const response = getData?.body?.hits?.hits;
571
571
  if ( !response || response.length == 0 ) {
572
- if ( inputData.storeId?.length > 0 ) {
572
+ if ( inputData.storeId?.length === 1 ) {
573
573
  const getStoreName = await findOneStore( { storeId: inputData.storeId }, { storeName: 1 } );
574
574
  return res.sendError( `No Pending items in the selected dates for the store ${getStoreName?.storeName || ''}`, 400 );
575
575
  }
@@ -646,7 +646,7 @@ export async function getTickets( req, res ) {
646
646
  }
647
647
  const finalResponse = inputData.action ? temp : response;
648
648
  if ( finalResponse?.length == 0 || !finalResponse ) {
649
- if ( inputData.storeId?.length > 0 ) {
649
+ if ( inputData.storeId?.length === 1 ) {
650
650
  const getStoreName = await findOneStore( { storeId: inputData.storeId }, { storeName: 1 } );
651
651
  return res.sendError( `No Pending items in the selected dates for the store ${getStoreName?.storeName || ''}`, 400 );
652
652
  }