aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/api/routes.go
blob: 90e740311a861d5e7adc6ef6bee1e422302b6a5d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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("POST /v1/datamapline", app.createDatamapLine)
	mux.HandleFunc("GET /v1/datamaps/{id}", app.showDatamapHandler)
	return mux
}