-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Description
Issue :
Currently, the admin interface allows managing links and users one by one. If an admin needs to delete or ban 50 malicious links from a single spammer, they must do it individually, which is inefficient.
Improvement: Implement a checkbox-based batch action system in the Admin Links table.
File Path : server/handlers/links.handler.js
Code logic to add :
// Add to server/handlers/links.handler.js
async function batchRemove(req, res) {
const { ids } = req.body; // Array of UUIDs
if (!Array.isArray(ids) || ids.length === 0) {
throw new CustomError("No links selected.");
}
await query.link.removeBatch({
uuids: ids,
...(!req.user.admin && { user_id: req.user.id })
});
return res.status(200).send({ message: `${ids.length} links deleted.` });
}
Frontend : Update server/views/partials/admin/links/table.hbs to include a "Select All" checkbox in the thead and individual checkboxes in each tr
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels