MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / apiV1GetColorPatterns

Function apiV1GetColorPatterns

internal/web/api_v1_colorpatterns.go:12–17  ·  view source on GitHub ↗

GET /admin/api/v1/colorpatterns

(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

10
11// GET /admin/api/v1/colorpatterns
12func apiV1GetColorPatterns(w http.ResponseWriter, r *http.Request) {
13 writeJSON(w, http.StatusOK, APIResponse[map[string][]int]{
14 Success: true,
15 Data: colorpatterns.GetAllColorPatterns(),
16 })
17}
18
19// POST /admin/api/v1/colorpatterns
20// Body: {"name": "flame", "colors": [1, 2, 3]}

Callers

nothing calls this directly

Calls 2

GetAllColorPatternsFunction · 0.92
writeJSONFunction · 0.85

Tested by

no test coverage detected