fix(admin): persist provider settings and enforce quotas

This commit is contained in:
ZheFox
2026-08-28 12:47:54 +08:00
parent c4b4dfa996
commit dd2958a458
9 changed files with 197 additions and 68 deletions
@@ -217,7 +217,7 @@ const props = defineProps<{
const emit = defineEmits<{
close: []
saved: []
saved: [key: EndpointAPIKey]
}>()
const { success, error: showError } = useToast()
@@ -390,9 +390,9 @@ async function handleSave() {
model_exclude_patterns: parsePatternText(form.value.model_exclude_patterns_text)
}
await updateProviderKey(props.editingKey.id, updateData)
const updatedKey = await updateProviderKey(props.editingKey.id, updateData)
success('账号已更新', '成功')
emit('saved')
emit('saved', updatedKey)
emit('close')
} catch (err: unknown) {
const errorMessage = parseApiError(err, '保存失败')