fix: Delete transactions on local browser DB after deleting it on the backend

This commit is contained in:
Víctor Falcón 2026-01-27 11:10:34 +01:00
parent bbc3027545
commit d1f69a284a
1 changed files with 2 additions and 0 deletions

View File

@ -1,4 +1,5 @@
import { encrypt, importKey } from '@/lib/crypto';
import { db } from '@/lib/dexie-db';
import { getStoredKey } from '@/lib/key-storage';
import { TransactionSyncManager } from '@/lib/sync-manager';
import type { Transaction } from '@/types/transaction';
@ -169,6 +170,7 @@ class TransactionSyncService {
async delete(id: string): Promise<void> {
await axios.delete(`/transactions/${id}`);
await db.transactions.delete(id);
}
async updateManyIndividual(