Added settings pages to bring all the settings together from patchmon options, profile page and server settings.

This commit is contained in:
Muhammad Ibrahim
2025-09-30 19:48:28 +01:00
parent 8ca22dc7ab
commit ed0cf79b53
16 changed files with 4638 additions and 149 deletions

View File

@@ -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 },
});
}