tango-app-api-trax 3.3.1-hotfix-18 → 3.3.1-hotfix-19
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-hotfix-
|
|
3
|
+
"version": "3.3.1-hotfix-19",
|
|
4
4
|
"description": "Trax",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"mongodb": "^6.8.0",
|
|
27
27
|
"nodemon": "^3.1.4",
|
|
28
28
|
"path": "^0.12.7",
|
|
29
|
-
"tango-api-schema": "^2.2.
|
|
29
|
+
"tango-api-schema": "^2.2.90",
|
|
30
30
|
"tango-app-api-middleware": "^3.1.70",
|
|
31
31
|
"url": "^0.11.4",
|
|
32
32
|
"winston": "^3.13.1",
|
|
@@ -1648,9 +1648,9 @@ async function getUserToken( clientId, userEmail ) {
|
|
|
1648
1648
|
export async function internalAISendPushNotification( req, res ) {
|
|
1649
1649
|
try {
|
|
1650
1650
|
let requestData = req.body;
|
|
1651
|
-
if ( !requestData.clientId ) {
|
|
1652
|
-
|
|
1653
|
-
}
|
|
1651
|
+
// if ( !requestData.clientId ) {
|
|
1652
|
+
// return res.sendError( 'clientId is Required', 400 );
|
|
1653
|
+
// }
|
|
1654
1654
|
if ( !( requestData?.email || requestData?.storeId ) ) {
|
|
1655
1655
|
return res.sendError( 'Email or StoreId is Required', 400 );
|
|
1656
1656
|
}
|
|
@@ -1666,12 +1666,15 @@ export async function internalAISendPushNotification( req, res ) {
|
|
|
1666
1666
|
let userData;
|
|
1667
1667
|
if ( requestData.email && requestData.email !='' ) {
|
|
1668
1668
|
// fcmToken = await getUserToken( requestData.clientId, requestData.email );
|
|
1669
|
-
userData = await userService.findOne( { clientId: requestData.clientId, email: requestData.email }, { fcmToken: 1, loginFrom: 1 } );
|
|
1669
|
+
// userData = await userService.findOne( { clientId: requestData.clientId, email: requestData.email }, { fcmToken: 1, loginFrom: 1 } );
|
|
1670
|
+
userData = await userService.findOne( { email: requestData.email }, { fcmToken: 1, loginFrom: 1 } );
|
|
1670
1671
|
} else {
|
|
1671
|
-
let storeData = await storeService.findOne( { clientId: requestData.clientId, storeId: requestData.storeId }, { spocDetails: 1 } );
|
|
1672
|
+
// let storeData = await storeService.findOne( { clientId: requestData.clientId, storeId: requestData.storeId }, { spocDetails: 1 } );
|
|
1673
|
+
let storeData = await storeService.findOne( { storeId: requestData.storeId }, { spocDetails: 1 } );
|
|
1672
1674
|
if ( storeData && storeData.spocDetails.length > 0 && storeData.spocDetails[0].email ) {
|
|
1673
1675
|
// fcmToken = await getUserToken( storeData.spocDetails[0].email );
|
|
1674
|
-
userData = await userService.findOne( { clientId: requestData.clientId, email: requestData.email }, { fcmToken: 1, loginFrom: 1 } );
|
|
1676
|
+
// userData = await userService.findOne( { clientId: requestData.clientId, email: requestData.email }, { fcmToken: 1, loginFrom: 1 } );
|
|
1677
|
+
userData = await userService.findOne( { email: requestData.email }, { fcmToken: 1, loginFrom: 1 } );
|
|
1675
1678
|
}
|
|
1676
1679
|
}
|
|
1677
1680
|
if ( !userData ) {
|
|
@@ -3397,8 +3397,8 @@ export async function clientConfig( req, res ) {
|
|
|
3397
3397
|
try {
|
|
3398
3398
|
let requestData = req.body;
|
|
3399
3399
|
if ( requestData.clientId && requestData.clientId !='' ) {
|
|
3400
|
-
let getClientData = await clientService.findOne( { clientId: requestData.clientId }, { traxRAWImageUpload: 1, clientId: 1, clientName: 1 } );
|
|
3401
|
-
console.log( ' getClientData=>', getClientData );
|
|
3400
|
+
let getClientData = await clientService.findOne( { clientId: requestData.clientId }, { traxRAWImageUpload: 1, clientId: 1, clientName: 1, traxBlockMobileTimeUpdate: 1 } );
|
|
3401
|
+
// console.log( ' getClientData=>', getClientData );
|
|
3402
3402
|
if ( getClientData ) {
|
|
3403
3403
|
return res.sendSuccess( getClientData );
|
|
3404
3404
|
} else {
|