|
|
@ -7,8 +7,8 @@ import (
|
|
|
|
"live/app/controller/short"
|
|
|
|
"live/app/controller/short"
|
|
|
|
"live/app/controller/topic"
|
|
|
|
"live/app/controller/topic"
|
|
|
|
"live/app/controller/user"
|
|
|
|
"live/app/controller/user"
|
|
|
|
"live/app/controller/user/grend"
|
|
|
|
"live/app/controller/user/trend"
|
|
|
|
grend2 "live/app/controller/user/grend/comment"
|
|
|
|
grend2 "live/app/controller/user/trend/comment"
|
|
|
|
"live/app/router/middleware"
|
|
|
|
"live/app/router/middleware"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
@ -58,7 +58,7 @@ func Router(router *gin.Engine) {
|
|
|
|
trendC := &user.Trend{}
|
|
|
|
trendC := &user.Trend{}
|
|
|
|
userR.POST("trend/list", trendC.List) // 会员动态列表
|
|
|
|
userR.POST("trend/list", trendC.List) // 会员动态列表
|
|
|
|
|
|
|
|
|
|
|
|
commentC := &grend.Comment{}
|
|
|
|
commentC := &trend.Comment{}
|
|
|
|
userR.POST("trend/comment/list", middleware.BothAuth(), commentC.List) // 评论列表
|
|
|
|
userR.POST("trend/comment/list", middleware.BothAuth(), commentC.List) // 评论列表
|
|
|
|
userR.POST("trend/comment/add", middleware.Auth(), commentC.Add) // 评论列表
|
|
|
|
userR.POST("trend/comment/add", middleware.Auth(), commentC.Add) // 评论列表
|
|
|
|
// 评论点赞
|
|
|
|
// 评论点赞
|
|
|
@ -66,7 +66,7 @@ func Router(router *gin.Engine) {
|
|
|
|
userR.POST("trend/comment/praise/add", middleware.Auth(), commentPraiseC.Add) // 评论点赞
|
|
|
|
userR.POST("trend/comment/praise/add", middleware.Auth(), commentPraiseC.Add) // 评论点赞
|
|
|
|
userR.POST("trend/comment/praise/cancel", middleware.Auth(), commentPraiseC.Cancel) // 评论取消点赞
|
|
|
|
userR.POST("trend/comment/praise/cancel", middleware.Auth(), commentPraiseC.Cancel) // 评论取消点赞
|
|
|
|
|
|
|
|
|
|
|
|
praiseC := &grend.Praise{}
|
|
|
|
praiseC := &trend.Praise{}
|
|
|
|
userR.POST("trend/praise/add", middleware.Auth(), praiseC.Add) // 动态点赞
|
|
|
|
userR.POST("trend/praise/add", middleware.Auth(), praiseC.Add) // 动态点赞
|
|
|
|
userR.POST("trend/praise/cancel", middleware.Auth(), praiseC.Cancel) // 动态取消点赞
|
|
|
|
userR.POST("trend/praise/cancel", middleware.Auth(), praiseC.Cancel) // 动态取消点赞
|
|
|
|
}
|
|
|
|
}
|
|
|
|