feat(qr-custom): hapus satu & reset histori dengan password admin
All checks were successful
CI / test (push) Successful in 1m47s
All checks were successful
CI / test (push) Successful in 1m47s
- endpoint delete/reset, verifikasi admin_password - tombol hapus di detail + reset di header histori - versi 0.6.5
This commit is contained in:
@@ -118,6 +118,16 @@ function acceptWarning(id, actor, note) {
|
||||
return getById(id);
|
||||
}
|
||||
|
||||
function remove(id) {
|
||||
const r = db.prepare('DELETE FROM custom_qr_payments WHERE id=?').run(Number(id) || 0);
|
||||
return r.changes || 0;
|
||||
}
|
||||
|
||||
function clearAll() {
|
||||
const r = db.prepare('DELETE FROM custom_qr_payments').run();
|
||||
return r.changes || 0;
|
||||
}
|
||||
|
||||
function regenerate(id, actor) {
|
||||
const old = getById(id);
|
||||
if (!old) throw new Error('Data tidak ditemukan.');
|
||||
@@ -196,6 +206,8 @@ module.exports = {
|
||||
markManualPaid,
|
||||
acceptWarning,
|
||||
regenerate,
|
||||
remove,
|
||||
clearAll,
|
||||
reject,
|
||||
markPaidFromWebhook,
|
||||
markWarningFromWebhook,
|
||||
|
||||
Reference in New Issue
Block a user