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

Method handleListJobs

internal/server/api.go:264–270  ·  view source on GitHub ↗

handleListJobs returns all jobs.

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

Source from the content-addressed store, hash-verified

262
263// handleListJobs returns all jobs.
264func (s *Server) handleListJobs(w http.ResponseWriter, r *http.Request) {
265 jobs := s.jobs.ListJobs()
266 writeJSON(w, http.StatusOK, map[string]any{
267 "jobs": jobs,
268 "count": len(jobs),
269 })
270}
271
272// handleGetJob returns a specific job.
273func (s *Server) handleGetJob(w http.ResponseWriter, r *http.Request) {

Callers 1

TestAPI_ListJobsFunction · 0.80

Calls 2

writeJSONFunction · 0.85
ListJobsMethod · 0.80

Tested by 1

TestAPI_ListJobsFunction · 0.64