From ec3024f2c353af3a758095cda16fdc37b247e3e9 Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Thu, 9 Jan 2025 20:13:41 +0800 Subject: [PATCH] feat: Change AppDto to AppItem (#7680) --- backend/app/dto/response/app.go | 6 +++--- backend/app/service/app.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/app/dto/response/app.go b/backend/app/dto/response/app.go index 2cbced1ef..3923a6945 100644 --- a/backend/app/dto/response/app.go +++ b/backend/app/dto/response/app.go @@ -10,8 +10,8 @@ import ( ) type AppRes struct { - Items []*AppDto `json:"items"` - Total int64 `json:"total"` + Items []*AppItem `json:"items"` + Total int64 `json:"total"` } type AppUpdateRes struct { @@ -28,7 +28,7 @@ type AppDTO struct { Tags []model.Tag `json:"tags"` } -type AppDto struct { +type AppItem struct { Name string `json:"name"` Key string `json:"key"` ID uint `json:"id"` diff --git a/backend/app/service/app.go b/backend/app/service/app.go index ac662ab0f..42b4f3d23 100644 --- a/backend/app/service/app.go +++ b/backend/app/service/app.go @@ -89,9 +89,9 @@ func (a AppService) PageApp(req request.AppSearch) (interface{}, error) { if err != nil { return nil, err } - var appDTOs []*response.AppDto + var appDTOs []*response.AppItem for _, ap := range apps { - appDTO := &response.AppDto{ + appDTO := &response.AppItem{ ID: ap.ID, Name: ap.Name, Key: ap.Key,