06/05 Optimize app: Add Plaid web hook, healthcheck
This commit is contained in:
@@ -39,6 +39,39 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Webhook status card -->
|
||||
<div class="pcard mb-4" style="border-left:3px solid {% if config.get('PLAID_WEBHOOK_URL') %}#7c3aed{% else %}#94a3b8{% endif %};">
|
||||
<div class="d-flex align-items-center justify-content-between flex-wrap gap-3">
|
||||
<div>
|
||||
<div style="font-size:13px;font-weight:600;margin-bottom:2px;">
|
||||
<i class="bi bi-bell{% if config.get('PLAID_WEBHOOK_URL') %}-fill text-primary{% else %}{% endif %} me-1"></i>
|
||||
Automatic Transaction Sync (Webhooks)
|
||||
</div>
|
||||
{% if config.get('PLAID_WEBHOOK_URL') %}
|
||||
<div style="font-size:11px;color:var(--muted);">
|
||||
Webhook URL: <code style="font-size:11px;">{{ config.get('PLAID_WEBHOOK_URL') }}</code>
|
||||
— Plaid will push transaction updates automatically.
|
||||
</div>
|
||||
{% else %}
|
||||
<div style="font-size:11px;color:var(--muted);">
|
||||
Not configured. Set <code>PLAID_WEBHOOK_URL=https://pfm.ngodanguyen.tech/plaid/webhook</code>
|
||||
in <code>.env</code> and restart. New connections will register it automatically.
|
||||
For existing items, click "Apply to Existing" after setting the URL.
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if config.get('PLAID_WEBHOOK_URL') and items %}
|
||||
<form method="POST" action="{{ url_for('plaid.update_webhook') }}">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<button type="submit" class="btn btn-sm btn-outline-primary" style="font-size:12px;"
|
||||
title="Register the configured PLAID_WEBHOOK_URL with all connected Plaid items">
|
||||
<i class="bi bi-arrow-repeat me-1"></i>Apply to Existing Items
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if items %}
|
||||
{% for item in items %}
|
||||
<div class="pcard mb-3">
|
||||
|
||||
Reference in New Issue
Block a user