proper stripe changes for prod

This commit is contained in:
Arjun Patel
2019-04-13 23:34:25 -07:00
parent 2010f33f0a
commit 232d3ad098
3 changed files with 9 additions and 4 deletions
+5 -1
View File
@@ -147,7 +147,11 @@ exports.activateStripeAccount = async (req, res, next) => {
{ replacements: { stripe_user_id, org_id } }
);
return res.status(302).redirect('http://localhost:8081/org/main/');
let redirectUrl =
process.env.NODE_ENV == 'production'
? 'http://thecharify.com/org/main'
: 'http://localhost:8081/org/main/';
return res.status(302).redirect(redirectUrl);
} catch (error) {
next(error);
}