From 807d24ccd83c3eefa951706df487b35972147468 Mon Sep 17 00:00:00 2001 From: dushixiang Date: Tue, 26 Jan 2021 22:33:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B5=84=E4=BA=A7=EF=BC=8C?= =?UTF-8?q?=E6=8E=88=E6=9D=83=E5=87=AD=E8=AF=81=EF=BC=8C=E6=8C=87=E4=BB=A4?= =?UTF-8?q?=E5=88=86=E9=A1=B5=E6=9F=A5=E8=AF=A2=E7=9A=84=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/api/asset.go | 5 ++++- pkg/api/command.go | 5 ++++- pkg/api/credential.go | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/pkg/api/asset.go b/pkg/api/asset.go index f581632..ed2074c 100644 --- a/pkg/api/asset.go +++ b/pkg/api/asset.go @@ -44,7 +44,10 @@ func AssetPagingEndpoint(c echo.Context) error { userGroupId := c.QueryParam("userGroupId") account, _ := GetCurrentAccount(c) - items, total, _ := model.FindPageAsset(pageIndex, pageSize, name, protocol, tags, account, owner, sharer, userGroupId) + items, total, err := model.FindPageAsset(pageIndex, pageSize, name, protocol, tags, account, owner, sharer, userGroupId) + if err != nil { + return err + } return Success(c, H{ "total": total, diff --git a/pkg/api/command.go b/pkg/api/command.go index 08c99ae..1c4d2b2 100644 --- a/pkg/api/command.go +++ b/pkg/api/command.go @@ -34,7 +34,10 @@ func CommandPagingEndpoint(c echo.Context) error { content := c.QueryParam("content") account, _ := GetCurrentAccount(c) - items, total, _ := model.FindPageCommand(pageIndex, pageSize, name, content, account) + items, total, err := model.FindPageCommand(pageIndex, pageSize, name, content, account) + if err != nil { + return err + } return Success(c, H{ "total": total, diff --git a/pkg/api/credential.go b/pkg/api/credential.go index 7e482c8..55df0fe 100644 --- a/pkg/api/credential.go +++ b/pkg/api/credential.go @@ -63,7 +63,10 @@ func CredentialPagingEndpoint(c echo.Context) error { name := c.QueryParam("name") account, _ := GetCurrentAccount(c) - items, total, _ := model.FindPageCredential(pageIndex, pageSize, name, account) + items, total, err := model.FindPageCredential(pageIndex, pageSize, name, account) + if err != nil { + return err + } return Success(c, H{ "total": total,