diff options
Diffstat (limited to 'makima/src/server/mod.rs')
| -rw-r--r-- | makima/src/server/mod.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/makima/src/server/mod.rs b/makima/src/server/mod.rs index 025ec85..99dc1f3 100644 --- a/makima/src/server/mod.rs +++ b/makima/src/server/mod.rs @@ -18,7 +18,7 @@ use tower_http::trace::TraceLayer; use utoipa::OpenApi; use utoipa_swagger_ui::SwaggerUi; -use crate::server::handlers::{api_keys, chat, contract_chat, contract_daemon, contract_discuss, contracts, daemon_download, directives, file_ws, files, history, listen, mesh, mesh_chat, mesh_daemon, mesh_merge, mesh_supervisor, mesh_ws, orders, repository_history, settings, speak, templates, transcript_analysis, users, versions}; +use crate::server::handlers::{api_keys, chat, contract_chat, contract_daemon, contract_discuss, contracts, daemon_download, directives, file_ws, files, history, listen, mesh, mesh_chat, mesh_daemon, mesh_merge, mesh_supervisor, mesh_ws, orders, repository_history, speak, templates, transcript_analysis, users, versions}; use crate::server::openapi::ApiDoc; use crate::server::state::SharedState; @@ -281,16 +281,7 @@ pub fn make_router(state: SharedState) -> Router { .route("/timeline", get(history::get_timeline)) // Contract type templates (built-in only) .route("/contract-types", get(templates::list_contract_types)) - // User settings (feature flags) endpoints - .route( - "/user-settings", - get(settings::list_settings).put(settings::upsert_setting), - ) - .route( - "/user-settings/{key}", - get(settings::get_setting).delete(settings::delete_setting), - ) - // Settings endpoints + // Settings endpoints (static routes first to avoid conflict with /settings/{key}) .route( "/settings/repository-history", get(repository_history::list_repository_history), @@ -303,6 +294,15 @@ pub fn make_router(state: SharedState) -> Router { "/settings/repository-history/{id}", axum::routing::delete(repository_history::delete_repository_history), ) + // User settings (feature flags / preferences) + .route( + "/settings", + get(settings::list_settings).put(settings::upsert_setting), + ) + .route( + "/settings/{key}", + get(settings::get_setting).delete(settings::delete_setting), + ) .with_state(state); let swagger = SwaggerUi::new("/swagger-ui") |
