feat: get movies, url parametes parsing and validating, sql exeme querying

This commit is contained in:
2026-03-18 13:52:32 +01:00
parent 03f11029a1
commit 6b170a2705
9 changed files with 265 additions and 8 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ func (app *application) routes() *httprouter.Router {
// Likewise, convert the methodNotAllowedResponse() helper to a http.Handler and set
// it as the custom error handler for 405 Method Not Allowed responses.
router.MethodNotAllowed = http.HandlerFunc(app.methodNotAllowedResponse)
router.HandlerFunc(http.MethodGet, "/v1/movies", app.listMoviesHandler)
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)