fix select key
This commit is contained in:
@@ -28,7 +28,7 @@ func (a Api) CreateApiKey(c *gin.Context) {
|
||||
}
|
||||
if slice.Contain([]string{"openai", "azure", "claude"}, *newkey.ApiType) {
|
||||
sma, err := utils.FetchKeyModel(a.db, newkey)
|
||||
if err == nil {
|
||||
if err == nil && len(sma) > 0 {
|
||||
newkey.SupportModelsArray = sma
|
||||
var buf = new(bytes.Buffer)
|
||||
json.NewEncoder(buf).Encode(sma) //nolint:errcheck
|
||||
|
||||
Reference in New Issue
Block a user