tango-app-api-trax 3.3.1-beta-43 → 3.3.1-beta-44

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.3.1-beta-43",
3
+ "version": "3.3.1-beta-44",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -3762,8 +3762,10 @@ export async function checklistAssign( req, res ) {
3762
3762
  }
3763
3763
  } ) );
3764
3764
 
3765
-
3766
- return res.sendSuccess( { count: userData.length, userData } );
3765
+ let uniqueArr = userData.filter( ( obj, index, self ) =>
3766
+ index === self.findIndex( ( o ) => o.storeId === obj.storeId && o.userEmail === obj.userEmail ),
3767
+ );
3768
+ return res.sendSuccess( { count: uniqueArr.length, uniqueArr } );
3767
3769
  } catch ( e ) {
3768
3770
  logger.error( { functionName: 'checklistAssign', error: e } );
3769
3771
  return res.sendError( e, 500 );