chore: apply cargo fmt across workspace and update docs

- Run cargo fmt on all Rust crates for consistent formatting
- Update CLAUDE.md with WASM plugin commands and dev.ps1 instructions
- Update wiki: add WASM plugin architecture, rewrite dev environment docs
- Minor frontend cleanup (unused imports)
This commit is contained in:
iven
2026-04-15 00:49:20 +08:00
parent e16c1a85d7
commit 9568dd7875
113 changed files with 4355 additions and 937 deletions

View File

@@ -30,14 +30,9 @@ where
page_size: Some(100),
};
let (settings, _total) = SettingService::list_by_scope(
"platform",
&None,
ctx.tenant_id,
&pagination,
&state.db,
)
.await?;
let (settings, _total) =
SettingService::list_by_scope("platform", &None, ctx.tenant_id, &pagination, &state.db)
.await?;
let languages: Vec<LanguageResp> = settings
.into_iter()
@@ -83,7 +78,7 @@ where
SettingService::set(
SetSettingParams {
key,
key: key.clone(),
scope: "platform".to_string(),
scope_id: None,
value,
@@ -96,9 +91,20 @@ where
)
.await?;
// 从返回的 SettingResp 中读取实际值
let updated = SettingService::get(&key, "platform", &None, ctx.tenant_id, &state.db).await?;
// 尝试从 value 中提取 name否则用 code 作为默认名称
let name = updated
.setting_value
.get("name")
.and_then(|v| v.as_str())
.unwrap_or(&code)
.to_string();
Ok(JsonResponse(ApiResponse::ok(LanguageResp {
code,
name: String::new(),
name,
is_active: req.is_active,
})))
}