From 73202113b69ec3c0d18355388d2f423a0fb2f00d Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Fri, 27 Jan 2023 23:51:05 -0300 Subject: [PATCH] organize user routes --- backend/routes/user.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/backend/routes/user.go b/backend/routes/user.go index 9133953..5c6cd73 100644 --- a/backend/routes/user.go +++ b/backend/routes/user.go @@ -9,9 +9,11 @@ import ( func UserRoutes(router *httprouter.Router) { router.POST("/login", controllers.Login) - router.GET("/users", middlewares.Authenticate(controllers.ListUsers)) - router.POST("/user", middlewares.Authenticate(controllers.CreateUser)) - router.GET("/user/:id", middlewares.Authenticate(controllers.GetUser)) - router.PATCH("/user/:id", middlewares.Authenticate(controllers.UpdateUser)) router.GET("/auth", middlewares.Authenticate(controllers.AuthenticateUser)) + + router.GET("/users", middlewares.Authenticate(controllers.ListUsers)) + router.GET("/user/:id", middlewares.Authenticate(controllers.GetUser)) + router.POST("/user", middlewares.Authenticate(controllers.CreateUser)) + router.PATCH("/user/:id", middlewares.Authenticate(controllers.UpdateUser)) + router.DELETE("/user/:id", middlewares.Authenticate(controllers.DeleteUser)) }