From 2b3539fcaa9076b0d5f8349482803f266a90666e Mon Sep 17 00:00:00 2001 From: CaIon <1808837298@qq.com> Date: Fri, 12 Jan 2024 14:57:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B8=A0=E9=81=93?= =?UTF-8?q?=E4=B8=80=E8=87=B4=E6=80=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/ability.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/model/ability.go b/model/ability.go index c7875da..7a81cc2 100644 --- a/model/ability.go +++ b/model/ability.go @@ -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