mirror of
https://github.com/csunny/DB-GPT.git
synced 2026-07-17 01:58:47 +00:00
Two backend integration bugs surfaced when /construct/connectors loaded:
1. GET /pending-confirms returned {Connector 'pending-confirms' not found}
because the route was defined AFTER GET /{connector_id}, so FastAPI
matched the catch-all first and treated 'pending-confirms' as a
connector_id. HITL polling never reached the queue endpoint.
Move /pending-confirms, /confirm, and ConfirmRequest BEFORE the
/{connector_id} routes so FastAPI matches the fixed paths first.
2. GET /api/v2/serve/connectors (no trailing slash) hit DB-GPT's static
Next-export fallback (404 HTML), because FastAPI registers the list
route as GET / under api_prefix and the auto-redirect was intercepted.
Frontend useConnectors() used the bare base URL.
Add API_BASE_LIST = `${API_BASE}/` constant and use it for the list
(GET /) and create (POST /) calls. Single-resource calls keep the
bare base + "/{id}" form.