proper stripe changes for prod
This commit is contained in:
@@ -147,7 +147,11 @@ exports.activateStripeAccount = async (req, res, next) => {
|
|||||||
{ replacements: { stripe_user_id, org_id } }
|
{ 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) {
|
} catch (error) {
|
||||||
next(error);
|
next(error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,3 +18,7 @@ Heroku Production database dropping, migrations, and seeding:
|
|||||||
- `heroku apps` to login to env
|
- `heroku apps` to login to env
|
||||||
- `heroku run DROP_TABLES=true node server.js --app ucharify-api` to drop the tables
|
- `heroku run DROP_TABLES=true node server.js --app ucharify-api` to drop the tables
|
||||||
- in local cmd or terminal run `Set NODE_ENV=production& npx sequelize db:seed:all` for seeding production db
|
- in local cmd or terminal run `Set NODE_ENV=production& npx sequelize db:seed:all` for seeding production db
|
||||||
|
|
||||||
|
|
||||||
|
Sequelize seed data in production. Similar to migrations:
|
||||||
|
`npx sequelize db:seed:all --env production` - any other NODE_ENV in place of `production`
|
||||||
@@ -30,7 +30,6 @@ module.exports = {
|
|||||||
estimate_yearly_operating_cost: 40000,
|
estimate_yearly_operating_cost: 40000,
|
||||||
|
|
||||||
is_nonprofit: true,
|
is_nonprofit: true,
|
||||||
is_verified: true,
|
|
||||||
|
|
||||||
primary_contact_phone: '9493873423',
|
primary_contact_phone: '9493873423',
|
||||||
primary_contact_first_name: 'Kamlesh',
|
primary_contact_first_name: 'Kamlesh',
|
||||||
@@ -62,7 +61,6 @@ module.exports = {
|
|||||||
estimate_yearly_operating_cost: 40000,
|
estimate_yearly_operating_cost: 40000,
|
||||||
|
|
||||||
is_nonprofit: true,
|
is_nonprofit: true,
|
||||||
is_verified: true,
|
|
||||||
|
|
||||||
primary_contact_phone: '6254581254',
|
primary_contact_phone: '6254581254',
|
||||||
primary_contact_first_name: 'Ajay',
|
primary_contact_first_name: 'Ajay',
|
||||||
@@ -94,7 +92,6 @@ module.exports = {
|
|||||||
estimate_yearly_operating_cost: 40000,
|
estimate_yearly_operating_cost: 40000,
|
||||||
|
|
||||||
is_nonprofit: true,
|
is_nonprofit: true,
|
||||||
is_verified: true,
|
|
||||||
|
|
||||||
primary_contact_phone: '6254581254',
|
primary_contact_phone: '6254581254',
|
||||||
primary_contact_first_name: 'Leo',
|
primary_contact_first_name: 'Leo',
|
||||||
|
|||||||
Reference in New Issue
Block a user