build/blob: fix awkward Ref type

This commit is contained in:
Blake Mizerany
2024-04-01 21:19:58 -07:00
parent fd411b3cf6
commit 7cfc8a0838
8 changed files with 325 additions and 122 deletions

View File

@@ -7,7 +7,6 @@ import (
"os"
"bllamo.com/build"
"bllamo.com/build/blob"
"bllamo.com/client/ollama/apitype"
"bllamo.com/oweb"
"bllamo.com/registry"
@@ -56,12 +55,7 @@ func (s *Server) handlePush(_ http.ResponseWriter, r *http.Request) error {
const registryURLTODO = "http://localhost:8888"
ref := blob.ParseRef(params.Name)
if !ref.FullyQualified() {
return errUnqualifiedRef
}
man, err := s.Build.Manifest(ref)
man, err := s.Build.Manifest(params.Name)
if err != nil {
if errors.Is(err, build.ErrNotFound) {
return errRefNotFound