refactor(caddy): flatten routes to a plain array like bookings

GET /api/caddy/routes now returns the route array directly instead of
{ system, custom }. Frontend state is CaddyRoute[] initialised to [],
rendered with a simple .map() and an empty-state message — mirroring how
bookings are loaded and displayed.
This commit is contained in:
Brückner
2026-06-08 14:08:57 +02:00
parent 1526d25144
commit d429b2d252
2 changed files with 14 additions and 10 deletions

View File

@ -1180,7 +1180,7 @@ async function startServer() {
app.get('/api/caddy/routes', requireAuth, (_req, res) => {
try {
res.json({ system: [], custom: getCaddyRoutes() });
res.json(getCaddyRoutes());
} catch (err: any) {
res.status(500).json({ error: err.message });
}