feat(trash): deferred purge after configurable days, groups in trash

This commit is contained in:
dev
2026-09-24 13:11:31 +03:00
parent e6c69c8a78
commit 8bf54fb95d
10 changed files with 482 additions and 73 deletions
+3 -2
View File
@@ -113,8 +113,9 @@ async function addGroup() {
}
async function delGroup(id) {
if (!confirm('Удалить группу? Фото группы также будут удалены.')) return;
await fetch(`${API}/api/groups/${id}`, { method: 'DELETE', headers: hdr() });
if (!confirm('Удалить группу? Группа попадёт в корзину, восстановить её можно будет позже.')) return;
const res = await fetch(`${API}/api/groups/${id}`, { method: 'DELETE', headers: hdr() });
if (!res.ok) { const e = await res.json(); alert(e.error || 'Ошибка'); }
loadGroups();
}