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:
@@ -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
|
||||
|
||||
@@ -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())
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user