fix: resolve route conflict in service management API
- Remove duplicate health::health_routes() merge that was conflicting with public_health_routes - Move service_management::router() to protected_routes for proper auth - Service management now works correctly: - /api/v1/mbe/health (public) - shows VLM status - /api/v2/service/start (protected) - starts llama-server - /api/v2/service/stop (protected) - stops llama-server
This commit is contained in:
+1
-2
@@ -160,6 +160,7 @@ pub async fn start_server(host: &str, port: u16) -> anyhow::Result<()> {
|
||||
.merge(vlm_search::vlm_search_routes())
|
||||
.merge(billing::billing_routes())
|
||||
.merge(job_management::job_management_routes())
|
||||
.merge(service_management::router())
|
||||
.layer(axum::middleware::from_fn_with_state(
|
||||
state.api_state.clone(),
|
||||
unified_auth,
|
||||
@@ -193,10 +194,8 @@ pub async fn start_server(host: &str, port: u16) -> anyhow::Result<()> {
|
||||
let app = Router::new()
|
||||
.merge(auth::auth_routes())
|
||||
.merge(public_health_routes)
|
||||
.merge(health::health_routes())
|
||||
.merge(docs::doc_routes())
|
||||
.merge(monitor::monitor_routes())
|
||||
.merge(service_management::router())
|
||||
.nest_service("/monitor", ServeDir::new("static/monitor"))
|
||||
.merge(protected_routes)
|
||||
.layer(cors)
|
||||
|
||||
Reference in New Issue
Block a user