mirror of
https://github.com/9technologygroup/patchmon.net.git
synced 2025-11-16 11:51:41 +00:00
Docker implementation
Profile fixes Hostgroup fixes TFA fixes
This commit is contained in:
@@ -24,7 +24,15 @@ router.get("/", authenticateToken, async (_req, res) => {
|
||||
},
|
||||
});
|
||||
|
||||
res.json(hostGroups);
|
||||
// Transform the count field to match frontend expectations
|
||||
const transformedGroups = hostGroups.map((group) => ({
|
||||
...group,
|
||||
_count: {
|
||||
hosts: group._count.host_group_memberships,
|
||||
},
|
||||
}));
|
||||
|
||||
res.json(transformedGroups);
|
||||
} catch (error) {
|
||||
console.error("Error fetching host groups:", error);
|
||||
res.status(500).json({ error: "Failed to fetch host groups" });
|
||||
|
||||
Reference in New Issue
Block a user