06/02 Optimize app 2
This commit is contained in:
@@ -280,6 +280,23 @@ def sync_all():
|
||||
return redirect(url_for('teller.sync_preview_view', teller_account_id=mapped[0].id))
|
||||
|
||||
|
||||
# ── Full resync (reset last_sync_date so next sync fetches full history) ─────
|
||||
|
||||
@teller_bp.route('/resync/<int:teller_account_id>', methods=['POST'])
|
||||
@login_required
|
||||
def full_resync(teller_account_id):
|
||||
ta = db.get_or_404(TellerAccount, teller_account_id)
|
||||
ta.last_sync_date = None
|
||||
ta.last_teller_txn_id = None
|
||||
db.session.commit()
|
||||
flash(
|
||||
f'{ta.account_name}: reset to full resync. '
|
||||
f'Next sync will fetch the last 90 days — duplicates will be skipped automatically.',
|
||||
'info'
|
||||
)
|
||||
return redirect(url_for('teller.index'))
|
||||
|
||||
|
||||
# ── Balance refresh ───────────────────────────────────────────────────────────
|
||||
|
||||
@teller_bp.route('/balance/<int:teller_account_id>', methods=['POST'])
|
||||
|
||||
Reference in New Issue
Block a user