feat: recover password & refresh token
This commit is contained in:
+8
-10
@@ -139,7 +139,7 @@ func (api *api) mount() http.Handler {
|
||||
|
||||
r.Route("/users", func(r chi.Router) {
|
||||
r.Put("/activate/{token}", api.activateUserHandler)
|
||||
//r.Put("/reset-password/{token}", api.resetPasswordHandler)
|
||||
r.Put("/reset-password/{token}", api.resetPasswordHandler)
|
||||
|
||||
r.Route("/me", func(r chi.Router) {
|
||||
r.Use(api.AuthTokenMiddleware)
|
||||
@@ -155,19 +155,17 @@ func (api *api) mount() http.Handler {
|
||||
r.Post("/forgot-password", api.forgotPasswordHandler)
|
||||
r.Post("/refresh", api.refreshTokenHandler)
|
||||
})
|
||||
})
|
||||
|
||||
r.Route("/admin", func(r chi.Router) {
|
||||
r.Use(api.AuthTokenMiddleware)
|
||||
r.Route("/admin", func(r chi.Router) {
|
||||
r.Use(api.AuthTokenMiddleware)
|
||||
|
||||
r.Route("/users", func(r chi.Router) {
|
||||
r.Get("/", api.protectAdminRoutes("moderator", api.getUsersHandler))
|
||||
|
||||
r.Route("/{id}", func(r chi.Router) {
|
||||
r.Get("/", api.protectAdminRoutes("moderator", api.getUserByIdHandler))
|
||||
r.Route("/users", func(r chi.Router) {
|
||||
r.Get("/", api.protectAdminRoutes("moderator", api.getUsersHandler))
|
||||
r.Route("/{id}", func(r chi.Router) {
|
||||
//r.Get("/", api.protectAdminRoutes("moderator", api.getUserByIdHandler))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
return r
|
||||
|
||||
Reference in New Issue
Block a user