fix: Delete transactions on local browser DB after deleting it on the backend
This commit is contained in:
parent
bbc3027545
commit
d1f69a284a
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in New Issue