Skip to content

Commit

Permalink
[build] add more field in the api list snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
cuongpiger committed May 31, 2024
1 parent 06e1731 commit 2037a21
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vngcloud/entity/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@ type Snapshot struct {
}

type ListSnapshots struct {
Items []*Snapshot
Items []*Snapshot
TotalPages int
Page int
PageSize int
TotalItems int
}
5 changes: 5 additions & 0 deletions vngcloud/services/volume/v2/snapshot_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ func (s *ListSnapshotByBlockVolumeIdResponse) ToEntityListSnapshots() *lsentity.
sl.Items = append(sl.Items, item.toEntitySnapshot())
}

sl.TotalPages = s.TotalPages
sl.Page = s.Page
sl.PageSize = s.PageSize
sl.TotalItems = s.TotalItems

return sl
}

Expand Down

0 comments on commit 2037a21

Please sign in to comment.