Skip to content

Commit

Permalink
Reset error details on bank account
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Oct 15, 2024
1 parent d9b331e commit 133181b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/jobs/src/transactions/manual-sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ client.defineJob({
.from("bank_accounts")
.update({
balance: accountBalance.data.amount,
error_details: null,
})
.eq("id", account.id);

Expand Down
5 changes: 4 additions & 1 deletion packages/jobs/src/transactions/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ client.defineJob({
if (balance.data?.amount && balance.data.amount > 0) {
await io.supabase.client
.from("bank_accounts")
.update({ balance: balance.data.amount })
.update({
balance: balance.data.amount,
error_details: null,
})
.eq("id", account.id);

await io.logger.info(`Updated balance for account ${account.id}`);
Expand Down

0 comments on commit 133181b

Please sign in to comment.