29 lines
963 B
Go
29 lines
963 B
Go
package v1
|
|
|
|
import (
|
|
"github.com/gogf/gf/v2/net/ghttp"
|
|
)
|
|
|
|
// CommentUserRoutes 用户评论路由
|
|
func CommentUserRoutes(group *ghttp.RouterGroup) {
|
|
// TODO: 需要实现middleware和user controller
|
|
// group.Middleware(middleware.AuthMiddleware)
|
|
// group.POST("/comment/create", middleware.AuthMiddleware, user.Comment.Create)
|
|
// group.GET("/comment/list", middleware.AuthMiddleware, user.Comment.GetList)
|
|
|
|
// 评论点赞
|
|
// group.POST("/comment/like", user.Comment.Like)
|
|
|
|
// 评论举报
|
|
// group.POST("/comment/report", user.Comment.Report)
|
|
}
|
|
|
|
// CommentAdminRoutes 管理员评论路由
|
|
func CommentAdminRoutes(group *ghttp.RouterGroup) {
|
|
// TODO: 需要实现admin controller
|
|
// group.GET("/admin/comment/list", admin.Comment.GetList)
|
|
// group.POST("/admin/comment/delete", admin.Comment.Delete)
|
|
// group.POST("/admin/comment/batch-delete", admin.Comment.BatchDelete)
|
|
// group.POST("/admin/comment/update-status", admin.Comment.UpdateStatus)
|
|
}
|