Skip to content

Commit

Permalink
fix: put routes on their exact location
Browse files Browse the repository at this point in the history
  • Loading branch information
Hopertz committed Sep 9, 2024
1 parent ac4efe8 commit 74c5436
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions cmd/api/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,18 @@ func (app *application) routes() *echo.Echo {

e.GET("/ping", app.pingHandler)
e.POST("/login", app.createAuthTokenHandler)
e.POST("/users", app.registerUserHandler)
e.GET("/lichess/leaderboard", app.leaderboardHandler)
e.POST("/users/activate", app.activateUserHandler)
e.POST("/users/forgot-password", app.forgotPasswordUserHandler)
e.POST("/users/change-password", app.changePasswordUserHandler)

g := e.Group("/auth")
g.Use(app.authenticate)
g.PUT("/users/:id", app.updateUserHandler)
g.POST("/users", app.registerUserHandler)
g.POST("/users/activate", app.activateUserHandler)
g.POST("/users/forgot-password", app.forgotPasswordUserHandler)
g.POST("/users/change-password", app.changePasswordUserHandler)

g.PUT("/users/:id", app.updateUserHandler)


return e

}

0 comments on commit 74c5436

Please sign in to comment.