feat(trash): deferred purge after configurable days, groups in trash
This commit is contained in:
+3
-2
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user