MCPcopy Index your code
hub / github.com/cortexlabs/cortex / GetAPIByID

Function GetAPIByID

pkg/operator/endpoints/get.go:48–59  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

46}
47
48func GetAPIByID(w http.ResponseWriter, r *http.Request) {
49 apiName := mux.Vars(r)["apiName"]
50 apiID := mux.Vars(r)["apiID"]
51
52 response, err := resources.GetAPIByID(apiName, apiID)
53 if err != nil {
54 respondError(w, r, err)
55 return
56 }
57
58 respondJSON(w, r, response)
59}

Callers

nothing calls this directly

Calls 3

GetAPIByIDFunction · 0.92
respondErrorFunction · 0.85
respondJSONFunction · 0.70

Tested by

no test coverage detected