From f9b93e8c85c8b3078cc705c5cfa93aae3bbd4eb2 Mon Sep 17 00:00:00 2001 From: zhengkunwang223 <31820853+zhengkunwang223@users.noreply.github.com> Date: Mon, 10 Jul 2023 18:49:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E5=95=86=E5=BA=97=E9=A1=B5=E9=9D=A2=E6=89=93=E5=BC=80=E9=80=9F?= =?UTF-8?q?=E5=BA=A6=20(#1596)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs https://github.com/1Panel-dev/1Panel/issues/1485 --- backend/app/service/app.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/backend/app/service/app.go b/backend/app/service/app.go index a6af9e5d3..6423353fe 100644 --- a/backend/app/service/app.go +++ b/backend/app/service/app.go @@ -84,12 +84,16 @@ func (a AppService) PageApp(req request.AppSearch) (interface{}, error) { return nil, err } var appDTOs []*response.AppDTO - for _, a := range apps { + for _, ap := range apps { + ap.ReadMe = "" + ap.Website = "" + ap.Document = "" + ap.Github = "" appDTO := &response.AppDTO{ - App: a, + App: ap, } appDTOs = append(appDTOs, appDTO) - appTags, err := appTagRepo.GetByAppId(a.ID) + appTags, err := appTagRepo.GetByAppId(ap.ID) if err != nil { continue } @@ -102,7 +106,7 @@ func (a AppService) PageApp(req request.AppSearch) (interface{}, error) { continue } appDTO.Tags = tags - installs, _ := appInstallRepo.ListBy(appInstallRepo.WithAppId(a.ID)) + installs, _ := appInstallRepo.ListBy(appInstallRepo.WithAppId(ap.ID)) appDTO.Installed = len(installs) > 0 } res.Items = appDTOs