MCPcopy Create free account
hub / github.com/bodaay/HuggingFaceModelDownloader / handlePlan

Method handlePlan

internal/server/api.go:166–175  ·  view source on GitHub ↗

handlePlan returns a download plan without starting the download.

(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

164
165// handlePlan returns a download plan without starting the download.
166func (s *Server) handlePlan(w http.ResponseWriter, r *http.Request) {
167 var req DownloadRequest
168 if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
169 writeError(w, http.StatusBadRequest, "Invalid request body", err.Error())
170 return
171 }
172
173 req.DryRun = true
174 s.handlePlanInternal(w, req)
175}
176
177func (s *Server) handlePlanInternal(w http.ResponseWriter, req DownloadRequest) {
178 if req.Repo == "" {

Callers

nothing calls this directly

Calls 3

handlePlanInternalMethod · 0.95
writeErrorFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected