feat: password reset
This commit is contained in:
@@ -25,10 +25,11 @@ func (app *application) routes() http.Handler {
|
||||
|
||||
router.HandlerFunc(http.MethodPost, "/v1/users", app.registerUserHandler)
|
||||
router.HandlerFunc(http.MethodPut, "/v1/users/activated", app.activateUserHandler)
|
||||
router.HandlerFunc(http.MethodPut, "/v1/users/password", app.updateUserPasswordHandler)
|
||||
|
||||
router.HandlerFunc(http.MethodPost, "/v1/tokens/authentication", app.createAuthenticationTokenHandler)
|
||||
router.HandlerFunc(http.MethodPost, "/v1/tokens/password-reset", app.createPasswordResetTokenHandler)
|
||||
|
||||
router.HandlerFunc(http.MethodPost, "/v1/tokens/authentication",
|
||||
app.createAuthenticationTokenHandler)
|
||||
// Register a new GET /debug/vars endpoint pointing to the expvar handler.
|
||||
router.Handler(http.MethodGet, "/debug/vars", expvar.Handler())
|
||||
|
||||
return app.metrics(app.recoverPanic(app.enableCORS(app.rateLimit(app.authenticate(router)))))
|
||||
|
||||
Reference in New Issue
Block a user