Files
2025-08-03 00:11:15 +08:00

42 lines
829 B
Go

package user
import (
"nl-video-api/internal/service"
"github.com/gogf/gf/v2/net/ghttp"
)
// CommentController 评论控制器
type CommentController struct{}
var Comment = &CommentController{}
// Add 添加评论
func (c *CommentController) Add(r *ghttp.Request) {
service.Comment.Add(r)
}
// List 评论列表
func (c *CommentController) List(r *ghttp.Request) {
service.Comment.GetList(r)
}
// Delete 删除评论
func (c *CommentController) Delete(r *ghttp.Request) {
service.Comment.Delete(r)
}
// Like 点赞评论
func (c *CommentController) Like(r *ghttp.Request) {
service.Comment.Like(r)
}
// Unlike 取消点赞
func (c *CommentController) Unlike(r *ghttp.Request) {
service.Comment.Unlike(r)
}
// Report 举报评论
func (c *CommentController) Report(r *ghttp.Request) {
service.Comment.Report(r)
}