mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 04:17:55 +08:00
feat(pagination): move pagination and sorting image summary results after conversion (#1637)
fix(config): check for config media type when pushing to repodb Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
This commit is contained in:
@@ -21,9 +21,9 @@ import (
|
||||
)
|
||||
|
||||
func ref[T any](input T) *T {
|
||||
obj := input
|
||||
ref := input
|
||||
|
||||
return &obj
|
||||
return &ref
|
||||
}
|
||||
|
||||
const (
|
||||
@@ -46,7 +46,7 @@ func TestReferrersSearchers(t *testing.T) {
|
||||
So(ok, ShouldBeFalse)
|
||||
})
|
||||
|
||||
Convey("GetRepoRefference fails", func() {
|
||||
Convey("GetRepoReference fails", func() {
|
||||
conf := searchConfig{
|
||||
params: map[string]*string{
|
||||
"subject": ref("bad-subject"),
|
||||
@@ -119,7 +119,7 @@ func TestReferrersSearchers(t *testing.T) {
|
||||
So(ok, ShouldBeFalse)
|
||||
})
|
||||
|
||||
Convey("GetRepoRefference fails", func() {
|
||||
Convey("GetRepoReference fails", func() {
|
||||
conf := searchConfig{
|
||||
params: map[string]*string{
|
||||
"subject": ref("bad-subject"),
|
||||
|
||||
+2
-2
@@ -636,7 +636,7 @@ func (search referrerSearcherGQL) search(config searchConfig) (bool, error) {
|
||||
|
||||
username, password := getUsernameAndPassword(*config.user)
|
||||
|
||||
repo, ref, refIsTag, err := zcommon.GetRepoRefference(*config.params["subject"])
|
||||
repo, ref, refIsTag, err := zcommon.GetRepoReference(*config.params["subject"])
|
||||
if err != nil {
|
||||
return true, err
|
||||
}
|
||||
@@ -692,7 +692,7 @@ func (search referrerSearcher) search(config searchConfig) (bool, error) {
|
||||
|
||||
username, password := getUsernameAndPassword(*config.user)
|
||||
|
||||
repo, ref, refIsTag, err := zcommon.GetRepoRefference(*config.params["subject"])
|
||||
repo, ref, refIsTag, err := zcommon.GetRepoReference(*config.params["subject"])
|
||||
if err != nil {
|
||||
return true, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user