JM-WechatMini/router/app/favorite.go
2023-11-02 04:34:46 +08:00

22 lines
506 B
Go

package app
import (
"github.com/gin-gonic/gin"
v1 "miniapp/api/v1"
"miniapp/middleware"
)
type FavoriteRouter struct{}
func (s *FavoriteRouter) InitFavoriteRouter(Router *gin.RouterGroup) {
favoriteRouter := Router.Group("favorite").Use(middleware.AuthorizeToken())
//publicRouter := Router.Group("user")
baseApi := v1.ApiGroupApp.AppApiGroup.FavoriteApi
{
favoriteRouter.POST("", baseApi.Create)
favoriteRouter.DELETE("", baseApi.Delete)
favoriteRouter.GET("list", baseApi.GetList)
}
}