mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 10:15:35 +01:00
Merge pull request #14319 from wy65701436/fix-blob-sorting
add sorting for list blobs
This commit is contained in:
commit
43a7fad93c
@ -223,6 +223,9 @@ func (d *dao) ListBlobs(ctx context.Context, query *q.Query) ([]*models.Blob, er
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if query.Sorting != "" {
|
||||
qs = qs.OrderBy(query.Sorting)
|
||||
}
|
||||
blobs := []*models.Blob{}
|
||||
if _, err = qs.All(&blobs); err != nil {
|
||||
return nil, err
|
||||
|
Loading…
Reference in New Issue
Block a user