MCPcopy
hub / github.com/cortexlabs/cortex / Refresh

Function Refresh

pkg/operator/endpoints/refresh.go:27–41  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

25)
26
27func Refresh(w http.ResponseWriter, r *http.Request) {
28 apiName := mux.Vars(r)["apiName"]
29 force := getOptionalBoolQParam("force", false, r)
30
31 msg, err := resources.RefreshAPI(apiName, force)
32 if err != nil {
33 respondError(w, r, err)
34 return
35 }
36
37 response := schema.RefreshResponse{
38 Message: msg,
39 }
40 respondJSON(w, r, response)
41}

Callers

nothing calls this directly

Calls 4

RefreshAPIFunction · 0.92
getOptionalBoolQParamFunction · 0.85
respondErrorFunction · 0.85
respondJSONFunction · 0.70

Tested by

no test coverage detected