fix: resolve overlapping route and deprecated base64 decode usage

Co-authored-by: aider (openai/andrew/openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-13 13:05:14 -03:00
parent 50150ce23d
commit 20a227fc9e
4 changed files with 3 additions and 7 deletions

View File

@@ -130,7 +130,7 @@ pub async fn handle_list_items(
)
)]
pub async fn handle_post_item(
State(state): State<AppState>,
State(_state): State<AppState>,
) -> Result<Json<ApiResponse<ItemInfo>>, StatusCode> {
// This is a simplified implementation

View File

@@ -16,7 +16,6 @@ use utoipa_swagger_ui::SwaggerUi;
status::handle_status,
item::handle_list_items,
item::handle_post_item,
item::handle_delete_item,
item::handle_get_item_latest,
item::handle_get_item_latest_meta,
item::handle_get_item_latest_content,
@@ -55,7 +54,4 @@ pub fn add_routes(router: Router<AppState>) -> Router<AppState> {
pub fn add_docs_routes(router: Router<AppState>) -> Router<AppState> {
router
.merge(SwaggerUi::new("/swagger").url("/openapi.json", ApiDoc::openapi()))
.route("/openapi.json", axum::routing::get(|| async {
axum::Json(ApiDoc::openapi())
}))
}

View File

@@ -3,7 +3,6 @@ use axum::{
http::StatusCode,
response::Json,
};
use log::warn;
use crate::modes::server::common::{AppState, ApiResponse};
use crate::common::status::{generate_status_info, StatusInfo};