fix select key
This commit is contained in:
1 parent
b83c6d9786
commit
b80f0759a5
5 files changed
+29
-26
No files matched your search
@@ -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