MCPcopy Create free account
hub / github.com/driangle/taskmd / handleConfig

Function handleConfig

apps/cli/internal/web/handlers.go:50–66  ·  view source on GitHub ↗
(cfg Config)

Source from the content-addressed store, hash-verified

48}
49
50func handleConfig(cfg Config) http.HandlerFunc {
51 phases := cfg.Phases
52 if phases == nil {
53 phases = []PhaseInfo{}
54 }
55 return func(w http.ResponseWriter, r *http.Request) {
56 p := effectivePhases(r, phases)
57 if p == nil {
58 p = []PhaseInfo{}
59 }
60 writeJSON(w, ConfigResponse{
61 ReadOnly: cfg.ReadOnly,
62 Version: cfg.Version,
63 Phases: p,
64 })
65 }
66}
67
68// getFilteredTasks returns tasks from the provider, optionally filtered by a
69// "phase" query parameter.

Callers 5

registerRoutesMethod · 0.85
TestHandleConfigFunction · 0.85

Calls 2

effectivePhasesFunction · 0.85
writeJSONFunction · 0.85