Fix bug of ping registry (#14625)

Fix bug of ping registry
fixes #14610

Signed-off-by: Wenkai Yin <yinw@vmware.com>
This commit is contained in:
Wenkai Yin(尹文开) 2021-04-14 11:11:09 +08:00 committed by GitHub
parent 81a72c0435
commit 28d4e285f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -219,7 +219,7 @@ func (r *registryAPI) PingRegistry(ctx context.Context, params operation.PingReg
registry.Type = *params.Registry.Type
}
if params.Registry.URL != nil {
url, err := lib.ValidateHTTPURL(registry.URL)
url, err := lib.ValidateHTTPURL(*params.Registry.URL)
if err != nil {
return r.SendError(ctx, err)
}