diff options
Diffstat (limited to 'cmd/api/routes.go')
-rw-r--r-- | cmd/api/routes.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cmd/api/routes.go b/cmd/api/routes.go new file mode 100644 index 0000000..acf13d0 --- /dev/null +++ b/cmd/api/routes.go @@ -0,0 +1,13 @@ +package main + +import "net/http" + +func (app *application) routes() *http.ServeMux { + + mux := http.NewServeMux() + + mux.HandleFunc("GET /v1/healthcheck", app.healthcheckHandler) + mux.HandleFunc("POST /v1/datamaps", app.createDatamapHandler) + mux.HandleFunc("GET /v1/datamaps/{id}", app.showDatamapHandler) + return mux +} |