(dp *DataProvider)
| 220 | } |
| 221 | |
| 222 | func handleGraph(dp *DataProvider) http.HandlerFunc { |
| 223 | return func(w http.ResponseWriter, r *http.Request) { |
| 224 | dp := effectiveDP(r, dp) |
| 225 | tasks, err := getFilteredTasks(dp, r) |
| 226 | if err != nil { |
| 227 | http.Error(w, err.Error(), http.StatusInternalServerError) |
| 228 | return |
| 229 | } |
| 230 | |
| 231 | g := graph.NewGraph(tasks) |
| 232 | writeJSON(w, g.ToJSON()) |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | func handleGraphMermaid(dp *DataProvider) http.HandlerFunc { |
| 237 | return func(w http.ResponseWriter, r *http.Request) { |