1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 00:09:16 +08:00

feat: Change AppDto to AppItem (#7680)

This commit is contained in:
zhengkunwang 2025-01-09 20:13:41 +08:00 committed by GitHub
parent 070f61e229
commit ec3024f2c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -10,8 +10,8 @@ import (
) )
type AppRes struct { type AppRes struct {
Items []*AppDto `json:"items"` Items []*AppItem `json:"items"`
Total int64 `json:"total"` Total int64 `json:"total"`
} }
type AppUpdateRes struct { type AppUpdateRes struct {
@ -28,7 +28,7 @@ type AppDTO struct {
Tags []model.Tag `json:"tags"` Tags []model.Tag `json:"tags"`
} }
type AppDto struct { type AppItem struct {
Name string `json:"name"` Name string `json:"name"`
Key string `json:"key"` Key string `json:"key"`
ID uint `json:"id"` ID uint `json:"id"`

View File

@ -89,9 +89,9 @@ func (a AppService) PageApp(req request.AppSearch) (interface{}, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
var appDTOs []*response.AppDto var appDTOs []*response.AppItem
for _, ap := range apps { for _, ap := range apps {
appDTO := &response.AppDto{ appDTO := &response.AppItem{
ID: ap.ID, ID: ap.ID,
Name: ap.Name, Name: ap.Name,
Key: ap.Key, Key: ap.Key,