diff --git a/app/controllers/stripe.controller.js b/app/controllers/stripe.controller.js index 8f8d936..e00b656 100644 --- a/app/controllers/stripe.controller.js +++ b/app/controllers/stripe.controller.js @@ -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); } diff --git a/docs/migrations b/docs/migrations-seeds similarity index 82% rename from docs/migrations rename to docs/migrations-seeds index cca60cd..d424b71 100644 --- a/docs/migrations +++ b/docs/migrations-seeds @@ -18,3 +18,7 @@ Heroku Production database dropping, migrations, and seeding: - `heroku apps` to login to env - `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 + + +Sequelize seed data in production. Similar to migrations: +`npx sequelize db:seed:all --env production` - any other NODE_ENV in place of `production` \ No newline at end of file diff --git a/seeders/20190122053544-base-orgs.js b/seeders/20190122053544-base-orgs.js index 2e477a5..b2a4ac2 100644 --- a/seeders/20190122053544-base-orgs.js +++ b/seeders/20190122053544-base-orgs.js @@ -30,7 +30,6 @@ module.exports = { estimate_yearly_operating_cost: 40000, is_nonprofit: true, - is_verified: true, primary_contact_phone: '9493873423', primary_contact_first_name: 'Kamlesh', @@ -62,7 +61,6 @@ module.exports = { estimate_yearly_operating_cost: 40000, is_nonprofit: true, - is_verified: true, primary_contact_phone: '6254581254', primary_contact_first_name: 'Ajay', @@ -94,7 +92,6 @@ module.exports = { estimate_yearly_operating_cost: 40000, is_nonprofit: true, - is_verified: true, primary_contact_phone: '6254581254', primary_contact_first_name: 'Leo',