testing 101

Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
2026-06-30 19:31:45 +08:00
parent 89acdfc239
commit 1372f4e975
62 changed files with 6696 additions and 281 deletions
+2 -2
View File
@@ -3,8 +3,8 @@
/**
* Single archive — soft delete one record
*/
async function archiveOne(Model, options, deletedBy, transaction) {
const record = await Model.findOne(options);
async function archiveOne(Model, where, deletedBy, transaction) {
const record = await Model.findOne({ where, transaction });
if (!record) return null;
await record.update({ deletedBy: deletedBy ?? null }, { transaction });
await record.destroy({ transaction });