From 65258f1ecf573be5ec4a42fafe691cc75ebfe5d9 Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Sun, 28 Apr 2019 18:37:10 -0700 Subject: [PATCH] adding in column and also proper redirecting to activate connect stripe account --- app/controllers/stripe.controller.js | 5 +---- models/Organization.js | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/controllers/stripe.controller.js b/app/controllers/stripe.controller.js index b5427f3..7682714 100644 --- a/app/controllers/stripe.controller.js +++ b/app/controllers/stripe.controller.js @@ -147,10 +147,7 @@ exports.activateStripeAccount = async (req, res, next) => { { replacements: { stripe_user_id, org_id } } ); - let redirectUrl = - process.env.NODE_ENV == 'production' - ? 'http://thecharify.com/org/main' - : 'http://localhost:8081/org/main/'; + let redirectUrl = process.env.STRIPE_CONNECT_ACTIVATE_REDIRECT_LINK; return res.status(302).redirect(redirectUrl); } catch (error) { next(error); diff --git a/models/Organization.js b/models/Organization.js index f251c30..0f5425e 100644 --- a/models/Organization.js +++ b/models/Organization.js @@ -118,6 +118,11 @@ module.exports = (sequelize, DataTypes) => { primary_contact_last_name: { type: DataTypes.STRING, allowNull: false + }, + + charify_credit: { + type: DataTypes.INTEGER, + defaultValue: 0 } }, {