From 7cc65a2ca797c6626695c08b54c795c2403bf82b Mon Sep 17 00:00:00 2001 From: Xu Bin <140785332+Reditiny@users.noreply.github.com> Date: Mon, 16 Dec 2024 20:38:53 +0800 Subject: [PATCH] refactor: add id for configsGetAll (#2361) --- models/configs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/configs.go b/models/configs.go index fe8b5534a..04926f391 100644 --- a/models/configs.go +++ b/models/configs.go @@ -130,7 +130,7 @@ func ConfigsGetAll(ctx *ctx.Context) ([]*Configs, error) { // select built-in ty } var lst []*Configs - err := DB(ctx).Model(&Configs{}).Select("ckey, cval"). + err := DB(ctx).Model(&Configs{}).Select("id, ckey, cval"). Where("ckey!='' and external=? ", 0).Find(&lst).Error if err != nil { return nil, errors.WithMessage(err, "failed to query configs")