Skip to content

Commit

Permalink
Update AuthwithToken 1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
fchrgrib committed Jun 15, 2023
1 parent 5f2ebea commit dd968fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions handlers/routers/Profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ func Profile(routers *gin.Engine) {
profileRouter.GET("", profile.Info)
profileRouter.PUT("/update_profile_desc", profile.UpdateProfileDescription)

rProfile := routers.Group("photo_profile")
rProfile.Use(middleware.AuthWithToken)
rProfile := privateRouters.Group("photo_profile")

profileRouter.PUT("/update_profile_picture", func(c *gin.Context) {
profile.UpdatePhotoProfile(c, rProfile)
Expand Down
3 changes: 1 addition & 2 deletions handlers/routers/WallpaperPage.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ func WallpaperPage(routers *gin.Engine) {
privateRouters.Use(middleware.JWT)
privateRouters.GET("", wallpaperpage.WallpaperCollection)

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

3 comments on commit dd968fe

@vercel
Copy link

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