From ab18bbaf23368160698e8fe14ec375c0f465c98f Mon Sep 17 00:00:00 2001 From: limitcool Date: Sat, 4 Apr 2026 00:45:47 +0800 Subject: [PATCH] Format backend controller responses --- backend/src/controllers/admin_api.rs | 5 +---- backend/src/controllers/ai.rs | 5 +---- backend/src/controllers/site_settings.rs | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/backend/src/controllers/admin_api.rs b/backend/src/controllers/admin_api.rs index 560c4db..d35813e 100644 --- a/backend/src/controllers/admin_api.rs +++ b/backend/src/controllers/admin_api.rs @@ -1416,10 +1416,7 @@ pub async fn reindex_ai(headers: HeaderMap, State(ctx): State) -> Re ) .await?; - format::json(AdminAiReindexResponse { - queued: true, - job, - }) + format::json(AdminAiReindexResponse { queued: true, job }) } #[debug_handler] diff --git a/backend/src/controllers/ai.rs b/backend/src/controllers/ai.rs index 9dbe278..46f3201 100644 --- a/backend/src/controllers/ai.rs +++ b/backend/src/controllers/ai.rs @@ -524,10 +524,7 @@ pub async fn reindex(headers: HeaderMap, State(ctx): State) -> Resul ) .await?; - format::json(ReindexResponse { - queued: true, - job, - }) + format::json(ReindexResponse { queued: true, job }) } pub fn routes() -> Routes { diff --git a/backend/src/controllers/site_settings.rs b/backend/src/controllers/site_settings.rs index f40c5d3..b25d4cd 100644 --- a/backend/src/controllers/site_settings.rs +++ b/backend/src/controllers/site_settings.rs @@ -4,9 +4,9 @@ use axum::http::HeaderMap; use loco_rs::prelude::*; -use sha2::{Digest, Sha256}; use sea_orm::{ActiveModelTrait, EntityTrait, IntoActiveModel, QueryOrder, Set}; use serde::{Deserialize, Serialize}; +use sha2::{Digest, Sha256}; use std::collections::HashSet; use uuid::Uuid;