Skip to content

Commit 4911095

Browse files
fix: apply authorizedGroup on thumb resources
1 parent 1266d13 commit 4911095

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/adapters/rest/handler/thumb_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func NewThumbHandler(service thumb.IThumbService) *ThumbHandler {
2020
}
2121
}
2222

23-
func (h *ThumbHandler) RegisterRoutes(router *gin.Engine) {
23+
func (h *ThumbHandler) RegisterRoutes(router *gin.RouterGroup) {
2424
thumbGroup := router.Group("/thumbs")
2525
thumbGroup.POST("", h.CreateProcess)
2626
thumbGroup.PUT("/:id", h.UpdateProcess)

internal/adapters/rest/server/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func (rs RestServer) Serve() {
3737

3838
handler.RegisterLoginHandlers(authorizedGroup)
3939

40-
handler.NewThumbHandler(rs.thumbService).RegisterRoutes(r)
40+
handler.NewThumbHandler(rs.thumbService).RegisterRoutes(authorizedGroup)
4141

4242
err := r.Run("0.0.0.0:8080")
4343
if err != nil {

0 commit comments

Comments
 (0)