feat: get user table
This commit is contained in:
@@ -62,9 +62,9 @@ func main() {
|
||||
router.GET("/auth/logout", auth.LogoutHandler)
|
||||
router.GET("/auth/logout_callback", auth.LogoutCallbackHandler(store))
|
||||
router.GET("/callback", auth.AuthenticationCallbackHandler(authenticator))
|
||||
router.GET("/public", controllers.PublicEndpoint)
|
||||
router.GET("/users", middleware.IsAuthenticated(authenticator), middleware.GetUserProfile, middleware.UserInDatabase(pool), middleware.UserIsActive(pool), middleware.IsAdmin(pool), controllers.GetUserTable(pool))
|
||||
|
||||
router.POST("/user/create", middleware.IsAuthenticated(authenticator), middleware.GetUserProfile, middleware.UserInDatabase(pool), middleware.UserIsActive(pool), controllers.CreateUser(pool))
|
||||
router.POST("/user/name", middleware.IsAuthenticated(authenticator), middleware.GetUserProfile, middleware.UserInDatabase(pool), middleware.UserIsActive(pool), controllers.SetUserName(pool))
|
||||
|
||||
router.PUT("/user/promote", middleware.IsAuthenticated(authenticator), middleware.GetUserProfile, middleware.UserInDatabase(pool), middleware.UserIsActive(pool), middleware.IsAdmin(pool), controllers.PromoteUser(pool))
|
||||
router.PUT("/user/demote", middleware.IsAuthenticated(authenticator), middleware.GetUserProfile, middleware.UserInDatabase(pool), middleware.UserIsActive(pool), middleware.IsAdmin(pool), controllers.DemoteUser(pool))
|
||||
|
||||
Reference in New Issue
Block a user