MCPcopy
hub / github.com/putyy/res-downloader / setConfig

Method setConfig

core/http.go:294–302  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

292}
293
294func (h *HttpServer) setConfig(w http.ResponseWriter, r *http.Request) {
295 var data Config
296 if err := json.NewDecoder(r.Body).Decode(&data); err != nil {
297 h.error(w, err.Error())
298 return
299 }
300 globalConfig.setConfig(data)
301 h.success(w)
302}
303
304func (h *HttpServer) setType(w http.ResponseWriter, r *http.Request) {
305 var data struct {

Callers

nothing calls this directly

Calls 2

errorMethod · 0.95
successMethod · 0.95

Tested by

no test coverage detected