(w http.ResponseWriter, r *http.Request)
| 164 | } |
| 165 | |
| 166 | func (h *NodeHandler) handleDetectGoogle(w http.ResponseWriter, r *http.Request) { |
| 167 | cfg, err := h.loadConfig() |
| 168 | if err != nil { |
| 169 | cfg = Config{ValidURLSuffix: "com"} |
| 170 | } |
| 171 | result, err := DetectGoogle(r.Context(), cfg) |
| 172 | if err != nil { |
| 173 | writeNodeJSON(w, http.StatusInternalServerError, map[string]any{"error": err.Error()}) |
| 174 | return |
| 175 | } |
| 176 | writeNodeJSON(w, http.StatusOK, result) |
| 177 | } |
| 178 | |
| 179 | func (h *NodeHandler) handleRun(w http.ResponseWriter, r *http.Request) { |
| 180 | var body struct { |
nothing calls this directly
no test coverage detected