mirror of
https://github.com/9technologygroup/patchmon.net.git
synced 2025-11-16 11:51:41 +00:00
Added settings pages to bring all the settings together from patchmon options, profile page and server settings.
This commit is contained in:
@@ -205,11 +205,11 @@ router.delete(
|
||||
return res.status(404).json({ error: "Host group not found" });
|
||||
}
|
||||
|
||||
// Check if host group has hosts
|
||||
// If host group has hosts, ungroup them first
|
||||
if (existingGroup._count.hosts > 0) {
|
||||
return res.status(400).json({
|
||||
error:
|
||||
"Cannot delete host group that contains hosts. Please move or remove hosts first.",
|
||||
await prisma.hosts.updateMany({
|
||||
where: { host_group_id: id },
|
||||
data: { host_group_id: null },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user