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,