Skip to content

Commit 7a18322

Browse files
committed
fix:ssl folder empty
#991
1 parent 271dac0 commit 7a18322

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

service/waf_service/waf_sslconfig.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,8 @@ func (receiver *WafSslConfigService) GetListApi(req request.SslConfigSearchReq)
339339
global.GWAF_LOCAL_DB.Model(&model.SslConfig{}).Where(whereField, whereValues...).Limit(req.PageSize).Offset(req.PageSize * (req.PageIndex - 1)).Order("valid_to desc").Find(&list)
340340
global.GWAF_LOCAL_DB.Model(&model.SslConfig{}).Where(whereField, whereValues...).Count(&total)
341341

342-
// 初始化返回结果列表
343-
var repList []response.WafSslConfigRep
342+
// 初始化返回结果列表(空列表也要序列化成 [] 而不是 null,前端直接当数组用)
343+
repList := make([]response.WafSslConfigRep, 0)
344344

345345
// 遍历查询结果,构建返回数据
346346
for _, sslConfig := range list {

0 commit comments

Comments
 (0)