feat(imports): import history and delete by import
Track imports in DB, show history in Data section, allow deleting transactions of a specific import instead of clearing all.
This commit is contained in:
@@ -171,5 +171,6 @@ export async function updateTransaction(
|
||||
|
||||
export async function clearAllTransactions(): Promise<{ deleted: number }> {
|
||||
const result = await pool.query('DELETE FROM transactions RETURNING id');
|
||||
await pool.query('DELETE FROM imports');
|
||||
return { deleted: result.rowCount ?? 0 };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user