From 38e7ddb39dc444375a5ab18444e9e645485a488c Mon Sep 17 00:00:00 2001 From: Blake Mizerany Date: Sun, 7 Apr 2024 16:42:05 -0700 Subject: [PATCH] x/api: fix broken build --- x/api/api.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/x/api/api.go b/x/api/api.go index 549cef029..e76a835d6 100644 --- a/x/api/api.go +++ b/x/api/api.go @@ -10,7 +10,7 @@ import ( "github.com/ollama/ollama/x/client/ollama/apitype" "github.com/ollama/ollama/x/oweb" "github.com/ollama/ollama/x/registry" - regtype "github.com/ollama/ollama/x/registry" + regtype "github.com/ollama/ollama/x/registry/apitype" ) // Common API Errors @@ -82,14 +82,11 @@ func (s *Server) handlePush(_ http.ResponseWriter, r *http.Request) error { return err } defer f.Close() - etag, err := registry.PushLayer(r.Context(), rq.URL, rq.Offset, rq.Size, f) + cp, err := registry.PushLayer(r.Context(), f, rq.URL, rq.Offset, rq.Size) if err != nil { return err } - uploads = append(uploads, regtype.CompletePart{ - URL: rq.URL, - ETag: etag, - }) + uploads = append(uploads, cp) return nil }() if err != nil {