mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-06 16:53:42 +08:00
fix: fix balance query for siliconflow (#1960)
This commit is contained in:
@@ -237,7 +237,7 @@ func updateChannelSiliconFlowBalance(channel *model.Channel) (float64, error) {
|
|||||||
if response.Code != 20000 {
|
if response.Code != 20000 {
|
||||||
return 0, fmt.Errorf("code: %d, message: %s", response.Code, response.Message)
|
return 0, fmt.Errorf("code: %d, message: %s", response.Code, response.Message)
|
||||||
}
|
}
|
||||||
balance, err := strconv.ParseFloat(response.Data.Balance, 64)
|
balance, err := strconv.ParseFloat(response.Data.TotalBalance, 64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user