feat: Add scripts for generating dummy data and copying thumbnails, and update admin deny routes to return JSON responses instead of redirects.

This commit is contained in:
x
2026-01-24 18:23:34 +01:00
parent f23b108f9f
commit 27d474d9e3
2 changed files with 2 additions and 5 deletions

View File

@@ -216,7 +216,6 @@
confirmBtn.disabled = false;
} else {
closeModal();
window.location.href = '/random';
}
} catch (e) {
alert('Error: ' + e); // Or e.message

View File

@@ -282,13 +282,11 @@ export default (router, tpl) => {
const id = +req.url.qs.id;
console.log(`[ADMIN DENY] Denying ID: ${id}`);
await deleteItem(id);
return res.writeHead(302, {
"Location": `/admin/approve`
}).end();
return res.reply({ success: true });
}
console.log('[ADMIN DENY] No ID provided');
return res.writeHead(302, { "Location": "/admin/approve" }).end();
return res.reply({ success: false, msg: "No ID provided" });
});
router.post(/^\/admin\/deny-multi\/?/, lib.auth, async (req, res) => {