This commit is contained in:
lbenedar
2026-03-10 16:00:53 +03:00
parent b4ea20d1d3
commit 71f15d1131
4 changed files with 43 additions and 3 deletions

View File

@@ -9,6 +9,9 @@ import (
func (app *application) routes() *httprouter.Router {
router := httprouter.New()
router.NotFound = http.HandlerFunc(app.notFoundResponse)
router.MethodNotAllowed = http.HandlerFunc(app.methodNotAllowedResponse)
router.HandlerFunc(http.MethodGet, "/v1/healthcheck", app.healthcheckHandler)
router.HandlerFunc(http.MethodPost, "/v1/movies", app.createMovieHandler)
router.HandlerFunc(http.MethodGet, "/v1/movies/:id", app.showMovieHandler)