tango-app-api-payment-subscription 3.0.24-dev → 3.0.25-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
|
@@ -784,8 +784,6 @@ export const trialApproval = async ( req, res ) => {
|
|
|
784
784
|
}
|
|
785
785
|
requestData.status = 'completed';
|
|
786
786
|
requestData.save().then( async () => {
|
|
787
|
-
req.body.clientId = requestData.clientId;
|
|
788
|
-
updatePricing( req, res, true );
|
|
789
787
|
if ( req.body.type == 'approve' ) {
|
|
790
788
|
let clientProducts = await paymentService.findOne( { clientId: requestData.clientId, status: 'active' }, { planDetails: 1 } );
|
|
791
789
|
if ( clientProducts?.planDetails.subscriptionType == 'free' ) {
|
|
@@ -809,6 +807,8 @@ export const trialApproval = async ( req, res ) => {
|
|
|
809
807
|
}
|
|
810
808
|
clientProducts.save();
|
|
811
809
|
await storeService.addremoveElement( { clientId: requestData.clientId, status: 'active' }, { $push: { product: requestData.name } } );
|
|
810
|
+
req.body.clientId = requestData.clientId;
|
|
811
|
+
updatePricing( req, res, true );
|
|
812
812
|
let userDetails= await userService.findOne( { clientId: requestData.clientId, role: 'superadmin' } );
|
|
813
813
|
let [ firstWord, secondWord ] = requestData.name.replace( /([a-z])([A-Z])/g, '$1 $2' ).split( ' ' );
|
|
814
814
|
firstWord = firstWord.charAt( 0 ).toUpperCase() + firstWord.slice( 1 );
|