tango-app-api-trax 3.3.1-beta-58 → 3.3.1-beta-59

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-58",
3
+ "version": "3.3.1-beta-59",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1972,7 +1972,7 @@ export const validateUserv1 = async ( req, res ) => {
1972
1972
 
1973
1973
  const duplicateStores = Object.keys( duplicateStore ).filter( ( storeName ) => duplicateStore[storeName].count > 1 );
1974
1974
  if ( duplicateStores.length ) {
1975
- return res.sendSuccess( { validate: false, ExistsEmail: duplicateStores, message: 'Store and email is duplicated' } );
1975
+ return res.sendError( { validate: false, duplicates: duplicateStores, message: 'Store and email is duplicated' }, 400 );
1976
1976
  }
1977
1977
  } else {
1978
1978
  const duplicateUser = assignDetails.reduce( ( acc, obj ) => {
@@ -1995,7 +1995,7 @@ export const validateUserv1 = async ( req, res ) => {
1995
1995
 
1996
1996
  const duplicateUsers = Object.keys( duplicateUser ).filter( ( storeName ) => duplicateUser[storeName].count > 1 );
1997
1997
  if ( duplicateUsers.length ) {
1998
- return res.sendSuccess( { validate: false, ExistsEmail: duplicateUsers, message: 'Email is Duplicated' } );
1998
+ return res.sendError( { validate: false, duplicates: duplicateUsers, message: 'Email is Duplicated' }, 400 );
1999
1999
  }
2000
2000
  }
2001
2001