fix utils
This commit is contained in:
@@ -3,7 +3,9 @@ package routes
|
||||
import (
|
||||
"git.trj.tw/golang/go-gallery/models"
|
||||
"git.trj.tw/golang/go-gallery/modules/context"
|
||||
"git.trj.tw/golang/go-gallery/modules/middleware"
|
||||
"git.trj.tw/golang/go-gallery/routers/account"
|
||||
"git.trj.tw/golang/go-gallery/routers/album"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
@@ -43,4 +45,9 @@ func SetDefaultRoutes(r *gin.Engine) {
|
||||
accountAPI.POST("/logout", context.PatchContext(account.UserLogout))
|
||||
accountAPI.POST("/signup", context.PatchContext(account.UserSignup))
|
||||
}
|
||||
api.GET("/albums", context.PatchContext(middleware.VerifyToken), context.PatchContext(album.GetAllAlbums))
|
||||
albumAPI := api.Group("/album", context.PatchContext(middleware.VerifyToken))
|
||||
{
|
||||
albumAPI.GET("/:id", context.PatchContext(album.GetAlbum))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user