tango-app-api-payment-subscription 3.0.52-dev → 3.0.53-dev
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-payment-subscription",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.53-dev",
|
|
4
4
|
"description": "paymentSubscription",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"nodemon": "^3.1.0",
|
|
27
27
|
"swagger-ui-express": "^5.0.0",
|
|
28
28
|
"tango-api-schema": "^2.0.104",
|
|
29
|
-
"tango-app-api-middleware": "^1.0.
|
|
29
|
+
"tango-app-api-middleware": "^1.0.73-test",
|
|
30
30
|
"winston": "^3.12.0",
|
|
31
31
|
"winston-daily-rotate-file": "^5.0.0"
|
|
32
32
|
},
|
|
@@ -1223,28 +1223,28 @@ export const productSubscribe = async ( req, res ) => {
|
|
|
1223
1223
|
} else {
|
|
1224
1224
|
let productIndex = product.findIndex( ( ele ) => ele.productName == item.name );
|
|
1225
1225
|
if ( productIndex != -1 ) {
|
|
1226
|
-
let logObj = {
|
|
1227
|
-
userName: req.user?.userName,
|
|
1228
|
-
email: req.user?.email,
|
|
1229
|
-
clientId: clientInfo.clientId,
|
|
1230
|
-
clientNotification: false,
|
|
1231
|
-
adminNotification: true,
|
|
1232
|
-
logSubType: 'productSubscribed',
|
|
1233
|
-
description: 'Your subscription is now active! Get ready to maximize your instore sales potential with the Tangoeye suite',
|
|
1234
|
-
// category: 'Brand Activity Log',
|
|
1235
|
-
// features: 'Subscription',
|
|
1236
|
-
title: 'Subscription',
|
|
1237
|
-
alertCta: [],
|
|
1238
|
-
markasRead: false,
|
|
1239
|
-
logType: 'subscription',
|
|
1240
|
-
showPushNotification: true,
|
|
1241
|
-
date: new Date(),
|
|
1242
|
-
changes: [ `${convertTitleCase( item.name )} prodcut Subscribed` ],
|
|
1243
|
-
eventType: '',
|
|
1244
|
-
showTo: [ 'client', 'tango' ],
|
|
1245
|
-
};
|
|
1246
|
-
insertOpenSearchData( appConfig.opensearch.activityLog, logObj );
|
|
1247
1226
|
if ( item.type == 'subscription' ) {
|
|
1227
|
+
let logObj = {
|
|
1228
|
+
userName: req.user?.userName,
|
|
1229
|
+
email: req.user?.email,
|
|
1230
|
+
clientId: clientInfo.clientId,
|
|
1231
|
+
clientNotification: false,
|
|
1232
|
+
adminNotification: true,
|
|
1233
|
+
logSubType: 'productSubscribed',
|
|
1234
|
+
description: 'Your subscription is now active! Get ready to maximize your instore sales potential with the Tangoeye suite',
|
|
1235
|
+
// category: 'Brand Activity Log',
|
|
1236
|
+
// features: 'Subscription',
|
|
1237
|
+
title: 'Subscription',
|
|
1238
|
+
alertCta: [],
|
|
1239
|
+
markasRead: false,
|
|
1240
|
+
logType: 'subscription',
|
|
1241
|
+
showPushNotification: true,
|
|
1242
|
+
date: new Date(),
|
|
1243
|
+
changes: [ `${convertTitleCase( item.name )} prodcut Subscribed` ],
|
|
1244
|
+
eventType: '',
|
|
1245
|
+
showTo: [ 'client', 'tango' ],
|
|
1246
|
+
};
|
|
1247
|
+
insertOpenSearchData( appConfig.opensearch.activityLog, logObj );
|
|
1248
1248
|
product[productIndex].subscribedDate = new Date();
|
|
1249
1249
|
product[productIndex].status = 'live';
|
|
1250
1250
|
subscriptionCount = subscriptionCount + 1;
|
|
@@ -2463,17 +2463,17 @@ export const getRemindClients = async ( req, res ) => {
|
|
|
2463
2463
|
showTo: [ 'client', 'tango' ],
|
|
2464
2464
|
};
|
|
2465
2465
|
insertOpenSearchData( appConfig.opensearch.activityLog, logObj );
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2466
|
+
const templateHtml = fs.readFileSync( path.resolve( path.dirname( '' ) ) + '/src/hbs/trialReminderEmail.hbs', 'utf8' );
|
|
2467
|
+
const template = Handlebars.compile( templateHtml );
|
|
2468
|
+
const html = template( { data: data } );
|
|
2469
|
+
let params = {
|
|
2470
|
+
toEmail: userDetails.email,
|
|
2471
|
+
mailSubject: 'TangoEye | Trial Ending Soon',
|
|
2472
|
+
htmlBody: html,
|
|
2473
|
+
attachment: '',
|
|
2474
|
+
sourceEmail: appConfig.cloud.aws.ses.adminEmail,
|
|
2475
|
+
};
|
|
2476
|
+
await sendEmailWithSES( params.toEmail, params.mailSubject, params.htmlBody, params.attachment, params.sourceEmail );
|
|
2477
2477
|
}
|
|
2478
2478
|
}
|
|
2479
2479
|
}
|