aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/api/routes.go
blob: acf13d0271ae287e896d15a7110977cf531656a0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
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
}