(mux *http.ServeMux)
| 118 | } |
| 119 | |
| 120 | func (s *Server) registerRoutes(mux *http.ServeMux) { |
| 121 | mux.HandleFunc("GET /api/projects", handleProjects(s.config.ListProjects)) |
| 122 | mux.HandleFunc("GET /api/config", handleConfig(s.config)) |
| 123 | mux.HandleFunc("GET /api/search", handleSearch(s.dp)) |
| 124 | mux.HandleFunc("GET /api/tasks", handleTasks(s.dp)) |
| 125 | mux.HandleFunc("GET /api/tasks/{id}", handleTaskByID(s.dp)) |
| 126 | mux.HandleFunc("GET /api/tasks/{id}/worklog", handleWorklog(s.dp)) |
| 127 | mux.HandleFunc("PUT /api/tasks/{id}", handleUpdateTask(s.dp, s.config.ReadOnly)) |
| 128 | mux.HandleFunc("GET /api/board", handleBoard(s.dp, s.config.Phases)) |
| 129 | mux.HandleFunc("GET /api/graph", handleGraph(s.dp)) |
| 130 | mux.HandleFunc("GET /api/graph/mermaid", handleGraphMermaid(s.dp)) |
| 131 | mux.HandleFunc("GET /api/stats", handleStats(s.dp)) |
| 132 | mux.HandleFunc("GET /api/next", handleNext(s.dp)) |
| 133 | mux.HandleFunc("GET /api/tracks", handleTracks(s.dp)) |
| 134 | mux.HandleFunc("GET /api/validate", handleValidate(s.dp)) |
| 135 | mux.HandleFunc("GET /api/feed", handleFeed(s.dp)) |
| 136 | mux.Handle("GET /api/events", s.broker) |
| 137 | } |
| 138 | |
| 139 | func (s *Server) printBanner() { |
| 140 | fmt.Printf("taskmd web server running at http://localhost:%d\n", s.config.Port) |
no test coverage detected