添加用户评论功能
This commit is contained in:
@@ -1,17 +1,16 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"toutoukan/controllers/article"
|
||||
"toutoukan/controllers/comments/getcomments"
|
||||
"toutoukan/controllers/comments/publishComments"
|
||||
"toutoukan/controllers/goods"
|
||||
"toutoukan/controllers/kills"
|
||||
"toutoukan/controllers/search"
|
||||
"toutoukan/controllers/system"
|
||||
"toutoukan/controllers/user"
|
||||
"toutoukan/init/ratelimit"
|
||||
"toutoukan/socket"
|
||||
"toutoukan/utill/jwt"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func SetupRouter() *gin.Engine {
|
||||
@@ -25,9 +24,9 @@ func SetupRouter() *gin.Engine {
|
||||
apiGroup.POST("/getInfo", user.GetUserInfo)
|
||||
|
||||
}
|
||||
r.GET("/socket", jwt.JWTAuthMiddleware(), func(c *gin.Context) {
|
||||
socket.WebsocketHandler(c)
|
||||
})
|
||||
//r.GET("/socket", jwt.JWTAuthMiddleware(), func(c *gin.Context) {
|
||||
// socket.WebsocketHandler(c)
|
||||
//})
|
||||
systemGroup := r.Group("/system")
|
||||
{
|
||||
systemGroup.POST("/sendMsg", system.SendMsg)
|
||||
@@ -49,6 +48,11 @@ func SetupRouter() *gin.Engine {
|
||||
{
|
||||
goodsGroup.GET("/getgoodslist", goods.GetGoods)
|
||||
}
|
||||
commentGroup := r.Group("/comment")
|
||||
{
|
||||
commentGroup.POST("/get", getcomments.GetComments)
|
||||
commentGroup.POST("/publish", publishComments.PublishComment)
|
||||
}
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user