Run bank sync in background to avoid gateway timeouts
sync-now and sync-all now return 202 Accepted immediately and dispatch work to a background task. The frontend uses the existing SignalR BankSyncComplete notification to stop the spinner and display results. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -47,10 +47,10 @@ export const bankSyncApi = {
|
||||
api.put<LinkedAccountInfo>(`/bank-sync/linked-accounts/${linkedAccountId}`, data),
|
||||
|
||||
syncNow: (connectionId: string) =>
|
||||
api.post<SyncResult>(`/bank-sync/connections/${connectionId}/sync-now`),
|
||||
api.post(`/bank-sync/connections/${connectionId}/sync-now`),
|
||||
|
||||
syncAll: () =>
|
||||
api.post<SyncResult>('/bank-sync/sync-all'),
|
||||
api.post('/bank-sync/sync-all'),
|
||||
|
||||
getSyncLogs: (connectionId?: string, limit = 50) =>
|
||||
api.get<SyncLogEntry[]>('/bank-sync/sync-logs', {
|
||||
|
||||
Reference in New Issue
Block a user