MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / handleDetect

Method handleDetect

internal/ipsentinel/nodehandler.go:157–164  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

155}
156
157func (h *NodeHandler) handleDetect(w http.ResponseWriter, r *http.Request) {
158 result, err := Detect(r.Context())
159 if err != nil {
160 writeNodeJSON(w, http.StatusInternalServerError, map[string]any{"error": err.Error()})
161 return
162 }
163 writeNodeJSON(w, http.StatusOK, result)
164}
165
166func (h *NodeHandler) handleDetectGoogle(w http.ResponseWriter, r *http.Request) {
167 cfg, err := h.loadConfig()

Callers

nothing calls this directly

Calls 3

DetectFunction · 0.85
writeNodeJSONFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected