Skip to content

Commit

Permalink
Update AuthwithToken 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
fchrgrib committed Jun 15, 2023
1 parent f8561f7 commit ceee036
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions handlers/routers/Images.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ import (
func Images(routers *gin.Engine) {

rImage := routers.Group("/images")
rImage.Use(func(c *gin.Context) {
middleware.AuthWithToken(c)
})
rImage.Use(middleware.AuthWithToken)
rImage.GET("/:id/download", wallpaperpage.DownloadWallpaper)
rImage.DELETE("/:id/delete", wallpaperpage.DeleteWallpaperController)

Expand Down
4 changes: 1 addition & 3 deletions handlers/routers/WallpaperPage.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ func WallpaperPage(routers *gin.Engine) {
privateRouters.GET("", wallpaperpage.WallpaperCollection)

rImage := routers.Group("/images")
rImage.Use(func(c *gin.Context) {
middleware.AuthWithToken(c)
})
rImage.Use(middleware.AuthWithToken)
privateRouters.POST("/upload", func(c *gin.Context) {
wallpaperpage.UploadWallpaper(c, rImage)
})
Expand Down

3 comments on commit ceee036

@vercel
Copy link

@vercel vercel bot commented on ceee036 Jun 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on ceee036 Jun 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on ceee036 Jun 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.