mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-19 08:56:37 +08:00
fix: 修复渠道一致性问题
This commit is contained in:
parent
e2a1caba4c
commit
2b3539fcaa
@ -1,6 +1,7 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"one-api/common"
|
"one-api/common"
|
||||||
"strings"
|
"strings"
|
||||||
@ -69,7 +70,7 @@ func GetRandomSatisfiedChannel(group string, model string) (*Channel, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return nil, nil
|
return nil, errors.New("channel not found")
|
||||||
}
|
}
|
||||||
err = DB.First(&channel, "id = ?", channel.Id).Error
|
err = DB.First(&channel, "id = ?", channel.Id).Error
|
||||||
return &channel, err
|
return &channel, err
|
||||||
|
Loading…
Reference in New Issue
Block a user