Skip to content

Commit

Permalink
fix events handler [eventPathAuth]
Browse files Browse the repository at this point in the history
  • Loading branch information
Arakasi21 committed May 21, 2024
1 parent f374cbf commit 971cc10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/handler/event/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (h *Handler) GetEventHandler(c *gin.Context) {
}

func (h *Handler) ListEventsHandler(c *gin.Context) {
const op = "EventHandler.ListEventHandler"
const op = "EventHandler.ListEventsHandler"
log := h.log.With(slog.String("op", op))

query := c.Query("query")
Expand Down
6 changes: 3 additions & 3 deletions internal/handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ func (h *Handler) InitRoutes() *gin.Engine {
eventPathAuth := eventPath.Group("")
{
eventPathAuth.Use(h.UsrHandler.AuthMiddleware())
eventPath.GET("/admin", h.UsrHandler.RoleAuthMiddleware([]userv1.Role{userv1.Role_DSVR, userv1.Role_ADMIN, userv1.Role_MODER}), h.EventHandler.ListEventsHandler)
eventPath.POST("/:id/upload/files", h.EventHandler.UploadFilesHandler)
eventPath.POST("/:id/upload/images", h.EventHandler.UploadImagesHandler)
eventPathAuth.GET("/admin", h.UsrHandler.RoleAuthMiddleware([]userv1.Role{userv1.Role_DSVR, userv1.Role_ADMIN, userv1.Role_MODER}), h.EventHandler.ListEventsHandler)
eventPathAuth.POST("/:id/upload/files", h.EventHandler.UploadFilesHandler)
eventPathAuth.POST("/:id/upload/images", h.EventHandler.UploadImagesHandler)
}
}

Expand Down

0 comments on commit 971cc10

Please sign in to comment.