Skip to content

Commit

Permalink
Update AuthwithToken 1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
fchrgrib committed Jun 15, 2023
1 parent 029b3f1 commit 5f2ebea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions controllers/wallpaperpage/UploadWallpaper.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package wallpaperpage
import (
"github.com/gin-gonic/gin"
"github.com/google/uuid"
"github.com/libs/middleware"
"github.com/libs/utils/data"
"github.com/models"
"net/http"
Expand Down Expand Up @@ -63,7 +62,6 @@ func UploadWallpaper(c *gin.Context, router *gin.RouterGroup) {

if fileStat.Size() != 0 {
router.GET(uid, func(context *gin.Context) {
middleware.AuthWithToken(c)
c.File(path)
})
}
Expand Down
1 change: 1 addition & 0 deletions handlers/routers/WallpaperPage.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ func WallpaperPage(routers *gin.Engine) {
privateRouters.GET("", wallpaperpage.WallpaperCollection)

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

3 comments on commit 5f2ebea

@vercel
Copy link

@vercel vercel bot commented on 5f2ebea 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 5f2ebea 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 5f2ebea 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.