初始化v1
This commit is contained in:
42
internal/controller/user/comment.go
Normal file
42
internal/controller/user/comment.go
Normal file
@@ -0,0 +1,42 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user