Fix bug when confirming transaction deletion
This commit is contained in:
parent
c5c3d1133a
commit
e86ec5291c
@ -288,7 +288,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function deleteTransaction() {
|
async function deleteTransaction() {
|
||||||
if (!confirm('Are you sure you want to delete this transaction? This operation is irreversible.')) {
|
if (!await confirm('Are you sure you want to delete this transaction? This operation is irreversible.')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -310,14 +310,14 @@
|
|||||||
`DELETE FROM postings
|
`DELETE FROM postings
|
||||||
WHERE transaction_id = $1`,
|
WHERE transaction_id = $1`,
|
||||||
[transaction.id]
|
[transaction.id]
|
||||||
)
|
);
|
||||||
|
|
||||||
// Delete transaction
|
// Delete transaction
|
||||||
await dbTransaction.execute(
|
await dbTransaction.execute(
|
||||||
`DELETE FROM transactions
|
`DELETE FROM transactions
|
||||||
WHERE id = $1`,
|
WHERE id = $1`,
|
||||||
[transaction.id]
|
[transaction.id]
|
||||||
)
|
);
|
||||||
|
|
||||||
await dbTransaction.commit();
|
await dbTransaction.commit();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user