simplify: unify 405 handlers, fix double-read in renameRundown, guard mcpClientConfig

- mcp.router.ts: extract identical GET/DELETE 405 responses into methodNotAllowed
- mcp.service.ts: pass the already-patched rundown object to initRundown instead
  of re-fetching it from the data provider
- McpSection.tsx: compute mcpClientConfig only when mcpEndpointUrl is truthy

https://claude.ai/code/session_01U24MeuUacYXeQhbX3tatEe
This commit is contained in:
Claude
2026-05-09 21:15:03 +00:00
committed by Carlos Valente
parent 65ef442a9d
commit ab15a65585
3 changed files with 11 additions and 10 deletions
@@ -25,7 +25,9 @@ export default function McpSection() {
});
}, [infoData]);
const mcpClientConfig = JSON.stringify({ mcpServers: { ontime: { url: mcpEndpointUrl } } }, null, 2);
const mcpClientConfig = mcpEndpointUrl
? JSON.stringify({ mcpServers: { ontime: { url: mcpEndpointUrl } } }, null, 2)
: '';
return (
<Panel.Section>