mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-19 23:28:20 +01:00
Merge pull request #10625 from ywk253100/200204_bug_fix
Update the method called by registry handler
This commit is contained in:
commit
5cf0481b51
@ -80,7 +80,7 @@ func (t *tagHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get tags ...
|
// get tags ...
|
||||||
total, tags, err := t.artCtl.Tags(req.Context(), &q.Query{
|
total, tags, err := t.artCtl.ListTags(req.Context(), &q.Query{
|
||||||
Keywords: map[string]interface{}{
|
Keywords: map[string]interface{}{
|
||||||
"RepositoryID": repository.RepositoryID,
|
"RepositoryID": repository.RepositoryID,
|
||||||
}}, nil)
|
}}, nil)
|
||||||
|
@ -69,8 +69,8 @@ func (f *FakeController) Delete(ctx context.Context, id int64) (err error) {
|
|||||||
return args.Error(0)
|
return args.Error(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tags ...
|
// ListTags ...
|
||||||
func (f *FakeController) Tags(ctx context.Context, query *q.Query, option *artifact.TagOption) (int64, []*artifact.Tag, error) {
|
func (f *FakeController) ListTags(ctx context.Context, query *q.Query, option *artifact.TagOption) (int64, []*artifact.Tag, error) {
|
||||||
args := f.Called()
|
args := f.Called()
|
||||||
var tags []*artifact.Tag
|
var tags []*artifact.Tag
|
||||||
if args.Get(1) != nil {
|
if args.Get(1) != nil {
|
||||||
@ -79,6 +79,12 @@ func (f *FakeController) Tags(ctx context.Context, query *q.Query, option *artif
|
|||||||
return int64(args.Int(0)), tags, args.Error(2)
|
return int64(args.Int(0)), tags, args.Error(2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CreateTag ...
|
||||||
|
func (f *FakeController) CreateTag(ctx context.Context, tag *artifact.Tag) (int64, error) {
|
||||||
|
args := f.Called()
|
||||||
|
return int64(args.Int(0)), args.Error(1)
|
||||||
|
}
|
||||||
|
|
||||||
// DeleteTag ...
|
// DeleteTag ...
|
||||||
func (f *FakeController) DeleteTag(ctx context.Context, tagID int64) (err error) {
|
func (f *FakeController) DeleteTag(ctx context.Context, tagID int64) (err error) {
|
||||||
args := f.Called()
|
args := f.Called()
|
||||||
|
Loading…
Reference in New Issue
Block a user