mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2025-12-24 08:12:55 +08:00
集成swagger
This commit is contained in:
@@ -12,6 +12,19 @@ type ArticleCollectHandler struct {
|
||||
Service ArticleCollectService
|
||||
}
|
||||
|
||||
// @Summary article_collect列表
|
||||
// @Tags article_collect文章
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param PageNo query int true "页码"
|
||||
// @Param PageSize query int true "每页大小"
|
||||
// @Param userId query int false "用户ID"
|
||||
// @Param articleId query int false "文章ID"
|
||||
// @Success 200 {object} response.PageResp "成功"
|
||||
// @Failure 400 {object} string "请求错误"
|
||||
// @Failure 500 {object} string "内部错误"
|
||||
// @Router /api/article_collect/list [get]
|
||||
//
|
||||
// list article_collect列表
|
||||
func (hd ArticleCollectHandler) List(c *gin.Context) {
|
||||
var page request.PageReq
|
||||
|
||||
@@ -18,5 +18,6 @@ func ArticleCollectRoute(rg *gin.RouterGroup) {
|
||||
handle := article_collect.ArticleCollectHandler{Service: server}
|
||||
|
||||
rg = rg.Group("/", middleware.TokenAuth())
|
||||
|
||||
rg.GET("/article_collect/list", handle.List)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user