init: radio init commit
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
package radio
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type InteractionRouter struct{}
|
||||
|
||||
func (r *InteractionRouter) InitInteractionRouter(Router *gin.RouterGroup) {
|
||||
// 收听历史
|
||||
historyRouter := Router.Group("history")
|
||||
{
|
||||
historyRouter.POST("list", interactionApi.GetHistoryList)
|
||||
historyRouter.POST("add", interactionApi.AddHistory)
|
||||
}
|
||||
|
||||
// 点赞
|
||||
likeRouter := Router.Group("like")
|
||||
{
|
||||
likeRouter.POST("toggle", interactionApi.ToggleLike)
|
||||
}
|
||||
|
||||
// 收藏
|
||||
favoriteRouter := Router.Group("favorite")
|
||||
{
|
||||
favoriteRouter.POST("list", interactionApi.GetFavoriteList)
|
||||
favoriteRouter.POST("add", interactionApi.AddFavorite)
|
||||
favoriteRouter.POST("remove", interactionApi.RemoveFavorite)
|
||||
}
|
||||
|
||||
// 评论
|
||||
commentRouter := Router.Group("comment")
|
||||
{
|
||||
commentRouter.POST("list", interactionApi.GetCommentList)
|
||||
commentRouter.POST("add", interactionApi.AddComment)
|
||||
commentRouter.POST("delete", interactionApi.DeleteComment)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user