fix: 低优先级收尾 — 图片上传/语言编辑/插件恢复/URL 编码
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled

- P3-2: ArticleEditor 图片上传接入 /upload 端点 + 封面图上传按钮
- P4-3: recover_plugins 添加 tenant 日志 + 同 ID 去重保护
- P4-4: LanguageManager 编辑弹窗改为真实表单 (name 字段) + 后端 name 持久化
- P4-6: Settings API getSetting/updateSetting 添加 encodeURIComponent
This commit is contained in:
iven
2026-04-26 19:52:42 +08:00
parent b05b7c27a0
commit 8a253a4910
7 changed files with 111 additions and 45 deletions

View File

@@ -10,6 +10,7 @@ export interface LanguageInfo {
export interface UpdateLanguageRequest {
is_active: boolean;
name?: string;
}
// --- API Functions ---

View File

@@ -11,7 +11,7 @@ export interface SettingInfo {
export async function getSetting(key: string, scope?: string, scopeId?: string) {
const { data } = await client.get<{ success: boolean; data: SettingInfo }>(
`/config/settings/${key}`,
`/config/settings/${encodeURIComponent(key)}`,
{ params: { scope, scope_id: scopeId } },
);
return data.data;
@@ -19,7 +19,7 @@ export async function getSetting(key: string, scope?: string, scopeId?: string)
export async function updateSetting(key: string, settingValue: unknown, version?: number) {
const { data } = await client.put<{ success: boolean; data: SettingInfo }>(
`/config/settings/${key}`,
`/config/settings/${encodeURIComponent(key)}`,
{ setting_value: settingValue, version },
);
return data.data;