Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
207a493f
Commit
207a493f
authored
Mar 07, 2026
by
ckken
Browse files
fix(ccswitch): parse remaining quota from /v1/usage response
parent
963b3b76
Changes
1
Hide whitespace changes
Inline
Side-by-side
frontend/src/views/user/KeysView.vue
View file @
207a493f
...
...
@@ -1638,10 +1638,12 @@ const executeCcsImport = (row: ApiKey, clientType: 'claude' | 'gemini') => {
headers: { "Authorization": "Bearer {{apiKey}}" }
},
extractor: function(response) {
const remaining = response?.remaining ?? response?.quota?.remaining ?? response?.balance;
const unit = response?.unit ?? response?.quota?.unit ?? "USD";
return {
isValid: response.is_active
||
true,
remaining
: response.balance
,
unit
: "USD"
isValid: response
?
.is_active
?? response?.isValid ??
true,
remaining,
unit
};
}
})`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment