diff --git a/lib/models/account.js b/lib/models/account.js index beb3834..ea9026c 100644 --- a/lib/models/account.js +++ b/lib/models/account.js @@ -199,8 +199,9 @@ class Account extends Model { debug(r3, 'Account.activateSubscription - replaced old subscription'); /* update account.plan to paid, if it isnt already */ + /* update account.is_active to 1, if account is deactivated */ await promisePool.execute( - 'UPDATE accounts SET plan_type = \'paid\' WHERE account_sid = ?', + 'UPDATE accounts SET plan_type = \'paid\', is_active = 1 WHERE account_sid = ?', [account_sid]); return true; }