fix: Resolve 75 compile errors across 13 backend files
Remove deprecated #[axum::async_trait] from 2 middleware files (native async traits on Rust 1.88+). Fix 71 stub handlers: change return type from ApiResult<impl IntoResponse> to ApiResult<Json<Value>> and replace todo!() with proper JSON stub responses. Clean compile, zero errors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@ use std::sync::Arc;
|
||||
|
||||
use axum::{
|
||||
routing::{get, post},
|
||||
Router,
|
||||
Json, Router,
|
||||
};
|
||||
|
||||
use crate::models::error::ApiResult;
|
||||
@@ -18,26 +18,26 @@ pub fn router() -> Router<Arc<AppState>> {
|
||||
.route("/history/{id}", get(get_wipe_history_detail))
|
||||
}
|
||||
|
||||
async fn trigger_wipe() -> ApiResult<impl axum::response::IntoResponse> {
|
||||
todo!()
|
||||
async fn trigger_wipe() -> ApiResult<Json<serde_json::Value>> {
|
||||
Ok(Json(serde_json::json!({"status": "not_implemented"})))
|
||||
}
|
||||
|
||||
async fn dry_run_wipe() -> ApiResult<impl axum::response::IntoResponse> {
|
||||
todo!()
|
||||
async fn dry_run_wipe() -> ApiResult<Json<serde_json::Value>> {
|
||||
Ok(Json(serde_json::json!({"status": "not_implemented"})))
|
||||
}
|
||||
|
||||
async fn rollback_wipe() -> ApiResult<impl axum::response::IntoResponse> {
|
||||
todo!()
|
||||
async fn rollback_wipe() -> ApiResult<Json<serde_json::Value>> {
|
||||
Ok(Json(serde_json::json!({"status": "not_implemented"})))
|
||||
}
|
||||
|
||||
async fn get_wipe_status() -> ApiResult<impl axum::response::IntoResponse> {
|
||||
todo!()
|
||||
async fn get_wipe_status() -> ApiResult<Json<serde_json::Value>> {
|
||||
Ok(Json(serde_json::json!({"status": "not_implemented"})))
|
||||
}
|
||||
|
||||
async fn get_wipe_history() -> ApiResult<impl axum::response::IntoResponse> {
|
||||
todo!()
|
||||
async fn get_wipe_history() -> ApiResult<Json<serde_json::Value>> {
|
||||
Ok(Json(serde_json::json!({"status": "not_implemented"})))
|
||||
}
|
||||
|
||||
async fn get_wipe_history_detail() -> ApiResult<impl axum::response::IntoResponse> {
|
||||
todo!()
|
||||
async fn get_wipe_history_detail() -> ApiResult<Json<serde_json::Value>> {
|
||||
Ok(Json(serde_json::json!({"status": "not_implemented"})))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user