feat: swagger format

This commit is contained in:
Blizzard
2026-02-11 16:22:17 +08:00
parent 112a1f439c
commit 69e59b0e36
14 changed files with 54 additions and 44 deletions
+4 -4
View File
@@ -16,7 +16,7 @@ type PostApi struct{}
// @Tags 帖子
// @Summary 发布帖子
// @Security BearerAuth
// @accept json
// @accept application/json
// @Produce application/json
// @Param data body plantReq.CreatePost true "发布帖子"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"发布成功"}"
@@ -43,7 +43,7 @@ func (a *PostApi) PublishPost(c *gin.Context) {
// @Tags 帖子
// @Summary 帖子列表
// @Security BearerAuth
// @accept json
// @accept application/json
// @Produce application/json
// @Param data body plantReq.PostPage true "分页获取帖子列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
@@ -74,7 +74,7 @@ func (a *PostApi) PostPage(c *gin.Context) {
// @Tags 帖子
// @Summary 我的发布
// @Security BearerAuth
// @accept json
// @accept application/json
// @Produce application/json
// @Param data body plantReq.PostPage true "分页获取帖子列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
@@ -127,7 +127,7 @@ func (a *PostApi) LikePost(c *gin.Context) {
// @Tags 帖子
// @Summary 评论帖子
// @Security BearerAuth
// @accept json
// @accept application/json
// @Produce application/json
// @Param data body plantReq.CreateComment true "评论帖子"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"评论成功"}"