feat: post api
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package plant
|
||||
|
||||
import "github.com/gin-gonic/gin"
|
||||
|
||||
type PostRouter struct{}
|
||||
|
||||
func (p *PostRouter) InitPostRouter(Router *gin.RouterGroup) {
|
||||
postRouter := Router.Group("post")
|
||||
{
|
||||
postRouter.POST("publish", postApi.PublishPost) // 发布帖子
|
||||
postRouter.POST("page", postApi.PostPage) // 帖子列表
|
||||
postRouter.GET("like", postApi.LikePost) // 点赞或者取消点赞
|
||||
postRouter.POST("comment", postApi.CommentPost) // 评论
|
||||
//postRouter.POST("deleteComment", postApi.delementComment) // 取消评论
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user