Creating listMoviesHandler and adding /v1/movies GET endpoint to use it.
This commit is contained in:
@@ -22,6 +22,8 @@ func (app *application) routes() http.Handler {
|
||||
respectively.
|
||||
*/
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user