mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-17 07:45:24 +01:00
Merge pull request #12494 from wy65701436/fix-manifest-404
fix get manifest return code
This commit is contained in:
commit
a74efdac4d
@ -73,7 +73,11 @@ func handleBlob(w http.ResponseWriter, r *http.Request, next http.Handler) error
|
||||
}
|
||||
|
||||
func preCheck(ctx context.Context) (art lib.ArtifactInfo, p *models.Project, ctl proxy.Controller, err error) {
|
||||
none := lib.ArtifactInfo{}
|
||||
art = lib.GetArtifactInfo(ctx)
|
||||
if art == none {
|
||||
return none, nil, nil, errors.New("artifactinfo is not found").WithCode(errors.NotFoundCode)
|
||||
}
|
||||
ctl = proxy.ControllerInstance()
|
||||
p, err = project.Ctl.GetByName(ctx, art.ProjectName, project.Metadata(false))
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user