You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
402 B
Go
18 lines
402 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/julienschmidt/httprouter"
|
|
)
|
|
|
|
func (app *application) routes() http.Handler {
|
|
router := httprouter.New()
|
|
|
|
router.HandlerFunc(http.MethodGet, "/v1/healthcheck", app.healthCheckHandler)
|
|
router.HandlerFunc(http.MethodPost, "/v1/movies", app.createMovieHandler)
|
|
router.HandlerFunc(http.MethodGet, "/v1/movies", app.getAllMoviesHandler)
|
|
|
|
return router
|
|
}
|