Creating registerUserHandler and registering the endpoint in our routes.go
All checks were successful
Deploy Greenlight API / deploy (push) Successful in 1m34s
All checks were successful
Deploy Greenlight API / deploy (push) Successful in 1m34s
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/julienschmidt/httprouter"
|
||||
"net/http"
|
||||
|
||||
"github.com/julienschmidt/httprouter"
|
||||
)
|
||||
|
||||
func (app *application) routes() http.Handler {
|
||||
@@ -29,6 +30,8 @@ func (app *application) routes() http.Handler {
|
||||
router.HandlerFunc(http.MethodPatch, "/v1/movies/:id", app.updateMovieHandler)
|
||||
router.HandlerFunc(http.MethodDelete, "/v1/movies/:id", app.deleteMovieHandler)
|
||||
|
||||
router.HandlerFunc(http.MethodPost, "/v1/users", app.registerUserHandler)
|
||||
|
||||
// Return the httprouter instance.
|
||||
// Wrap the router with the panic recovery middleware
|
||||
// Wrap the router with the rateLimit() middleware
|
||||
|
||||
Reference in New Issue
Block a user