ch9.2-9.3

This commit is contained in:
lbenedar
2026-03-18 16:31:33 +03:00
parent 985340c557
commit 17267ed145
6 changed files with 149 additions and 0 deletions

View File

@@ -13,6 +13,8 @@ func (app *application) routes() *httprouter.Router {
router.MethodNotAllowed = http.HandlerFunc(app.methodNotAllowedResponse)
router.HandlerFunc(http.MethodGet, "/v1/healthcheck", app.healthcheckHandler)
router.HandlerFunc(http.MethodGet, "/v1/movies", app.listMoviesHandler)
router.HandlerFunc(http.MethodPost, "/v1/movies", app.createMovieHandler)
router.HandlerFunc(http.MethodGet, "/v1/movies/:id", app.showMovieHandler)
router.HandlerFunc(http.MethodPatch, "/v1/movies/:id", app.updateMovieHandler)