chore(api): apply rustfmt across modules and tests

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Chengdong Zhang
2026-09-21 18:52:52 +08:00
co-authored by Cursor
parent 6c1357ec4d
commit a4ef6ca49e
46 changed files with 495 additions and 334 deletions
+5 -7
View File
@@ -34,13 +34,11 @@ const SELECT_PROFILE: &str = "SELECT s.id, s.slug, s.name,
const SHOP_COLS: &str = "id, name, slug, status, created_at";
pub async fn get_by_id(state: &AppState, id: Uuid) -> ApiResult<Shop> {
sqlx::query_as::<_, Shop>(&format!(
"SELECT {SHOP_COLS} FROM shops WHERE id = $1"
))
.bind(id)
.fetch_optional(&state.db)
.await?
.ok_or_else(|| ApiError::NotFound("shop".into()))
sqlx::query_as::<_, Shop>(&format!("SELECT {SHOP_COLS} FROM shops WHERE id = $1"))
.bind(id)
.fetch_optional(&state.db)
.await?
.ok_or_else(|| ApiError::NotFound("shop".into()))
}
pub async fn list_admin(state: &AppState) -> ApiResult<Vec<Shop>> {