".github/git@web.lueluesay.top:chenxi/sub2api.git" did not exist on "cab60ef735b2edb900f8352d6246cbbe7ed8a205"
Commit af753de4 authored by shaw's avatar shaw
Browse files

fix: 修复账号修改代理更新无效的bug

parent 3956819c
......@@ -831,7 +831,8 @@ const buildUpdatePayload = (): Record<string, unknown> | null => {
let credentialsChanged = false
if (enableProxy.value) {
updates.proxy_id = proxyId.value
// 后端期望 proxy_id: 0 表示清除代理,而不是 null
updates.proxy_id = proxyId.value === null ? 0 : proxyId.value
}
if (enableConcurrency.value) {
......
......@@ -1053,6 +1053,10 @@ const handleSubmit = async () => {
submitting.value = true
try {
const updatePayload: Record<string, unknown> = { ...form }
// 后端期望 proxy_id: 0 表示清除代理,而不是 null
if (updatePayload.proxy_id === null) {
updatePayload.proxy_id = 0
}
// For apikey type, handle credentials update
if (props.account.type === 'apikey') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment