fix: 修复渠道一致性问题

This commit is contained in:
CaIon 2024-01-12 14:57:03 +08:00
parent e2a1caba4c
commit 2b3539fcaa

View File

@ -1,6 +1,7 @@
package model
import (
"errors"
"fmt"
"one-api/common"
"strings"
@ -69,7 +70,7 @@ func GetRandomSatisfiedChannel(group string, model string) (*Channel, error) {
}
}
} else {
return nil, nil
return nil, errors.New("channel not found")
}
err = DB.First(&channel, "id = ?", channel.Id).Error
return &channel, err