06/03 Optimize app
This commit is contained in:
@@ -17,6 +17,7 @@ from app.services.schwab_service import (
|
||||
|
||||
schwab_bp = Blueprint('schwab', __name__, url_prefix='/schwab')
|
||||
log = logging.getLogger(__name__)
|
||||
from app.utils.audit import audit
|
||||
|
||||
|
||||
def _active_connection():
|
||||
@@ -113,6 +114,7 @@ def callback():
|
||||
))
|
||||
|
||||
db.session.commit()
|
||||
audit('schwab_connected')
|
||||
flash('Schwab connected successfully. Map your accounts to get started.', 'success')
|
||||
return redirect(url_for('schwab.map_accounts'))
|
||||
|
||||
@@ -314,5 +316,6 @@ def disconnect():
|
||||
for sa in connection.accounts:
|
||||
sa.is_active = False
|
||||
db.session.commit()
|
||||
audit('schwab_disconnected')
|
||||
flash('Disconnected from Schwab. Your imported transactions are kept.', 'info')
|
||||
return redirect(url_for('schwab.index'))
|
||||
|
||||
Reference in New Issue
Block a user