feat: post api

This commit is contained in:
Blizzard
2026-02-06 17:28:42 +08:00
parent 3115b58cb2
commit 87c31f119f
14 changed files with 420 additions and 6 deletions
+17
View File
@@ -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) // 取消评论
}
}