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