From 9f44ade2ade3f3ac5691e0d36ab24669d2f78ce4 Mon Sep 17 00:00:00 2001 From: "DESKTOP-4RNDQIC\\29019" <290198252@qq.com> Date: Tue, 16 Jun 2020 00:34:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=87=E7=AB=A0=E6=A8=A1?= =?UTF-8?q?=E7=B3=8A=E7=B4=A2=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/blog.go | 6 ++++++ main.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/controller/blog.go b/controller/blog.go index 131ee82..0a42d88 100644 --- a/controller/blog.go +++ b/controller/blog.go @@ -198,6 +198,12 @@ func UpdateArtilce(c *gin.Context) { rsp.Status = 0 } +func SearchArticle(c *gin.Context) { + rsp := RespBase{Msg:"FAIL", Status:210,} + defer func() { + c.JSON(200,rsp) + }() +} func AddArticle(c *gin.Context) { rsp := RespBase{Msg:"FAIL", Status:210,} type ReqAddArticle struct { diff --git a/main.go b/main.go index c28c980..8797f57 100644 --- a/main.go +++ b/main.go @@ -118,7 +118,7 @@ func main() { api.GET("/article/:id",controller.GetArticle) //获取文章 api.POST("/articles",controller.GetArticles) // 获取所有文章 api.PUT("/article",controller.AddArticle) // 添加文章 - + api.PUT("/article_search",controller.AddArticle) // 添加文章 api.GET("article_type",controller.ArticlesType) //获取所有文章分类 api.PUT("article_type",controller.AddArticleType) api.DELETE("article_type",controller.DeleteArticleType)