MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / successData

Function successData

server-source-code/internal/handler/alerts.go:26–28  ·  view source on GitHub ↗

successData wraps response for Node/frontend compatibility.

(w http.ResponseWriter, data interface{})

Source from the content-addressed store, hash-verified

24
25// successData wraps response for Node/frontend compatibility.
26func successData(w http.ResponseWriter, data interface{}) {
27 JSON(w, http.StatusOK, map[string]interface{}{"success": true, "data": data})
28}
29
30// List handles GET /alerts.
31func (h *AlertsHandler) List(w http.ResponseWriter, r *http.Request) {

Callers 11

ListMethod · 0.85
GetStatsMethod · 0.85
GetAvailableActionsMethod · 0.85
GetByIDMethod · 0.85
GetHistoryMethod · 0.85
PerformActionMethod · 0.85
AssignMethod · 0.85
UnassignMethod · 0.85
DeleteMethod · 0.85
BulkDeleteMethod · 0.85
BulkActionMethod · 0.85

Calls 1

JSONFunction · 0.70

Tested by

no test coverage detected