This commit is contained in:
Wenkai Yin 2017-08-10 11:09:04 +08:00
parent 689994fa93
commit 7205d03106

View File

@ -379,7 +379,7 @@ func assemble(client *registry.Repository, repository string,
var err error var err error
signatures := map[string]*notary.Target{} signatures := map[string]*notary.Target{}
if config.WithNotary() { if config.WithNotary() {
signatures, err = getSignatures(repository, username) signatures, err = getSignatures(username, repository)
if err != nil { if err != nil {
signatures = map[string]*notary.Target{} signatures = map[string]*notary.Target{}
log.Errorf("failed to get signatures of %s: %v", repository, err) log.Errorf("failed to get signatures of %s: %v", repository, err)
@ -769,7 +769,7 @@ func (ra *RepositoryAPI) ScanAll() {
ra.Ctx.ResponseWriter.WriteHeader(http.StatusAccepted) ra.Ctx.ResponseWriter.WriteHeader(http.StatusAccepted)
} }
func getSignatures(repository, username string) (map[string]*notary.Target, error) { func getSignatures(username, repository string) (map[string]*notary.Target, error) {
targets, err := notary.GetInternalTargets(config.InternalNotaryEndpoint(), targets, err := notary.GetInternalTargets(config.InternalNotaryEndpoint(),
username, repository) username, repository)
if err != nil { if err != nil {