From 2b6e505533ba8dd44c129006c2b014c16ce04010 Mon Sep 17 00:00:00 2001 From: ryoha000 <48485650+ryoha000@users.noreply.github.com> Date: Wed, 27 Nov 2019 07:24:01 +0900 Subject: [PATCH 1/2] =?UTF-8?q?GET=20/api/files/:id=E3=82=92=E8=AA=8D?= =?UTF-8?q?=E8=A8=BC=E3=81=AA=E3=81=97=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- router/router.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/router/router.go b/router/router.go index f2038db5..6485095f 100644 --- a/router/router.go +++ b/router/router.go @@ -43,10 +43,11 @@ func SetupRouting(e *echo.Echo, client Traq) { apiComments.GET("", GetComments) } - apiFiles := api.Group("/files") + apiFiles := api.Group("/api/files") { apiFiles.POST("", PostFile, middleware.BodyLimit("3MB")) - apiFiles.GET("/:id", GetFile) } + } + e.GET("/api/files/:id", GetFile) } From f2b417b9544c39624b244e814f9748cf63be283b Mon Sep 17 00:00:00 2001 From: ryoha000 <48485650+ryoha000@users.noreply.github.com> Date: Wed, 27 Nov 2019 07:29:03 +0900 Subject: [PATCH 2/2] fix bug --- router/router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/router/router.go b/router/router.go index 6485095f..1f2951da 100644 --- a/router/router.go +++ b/router/router.go @@ -43,7 +43,7 @@ func SetupRouting(e *echo.Echo, client Traq) { apiComments.GET("", GetComments) } - apiFiles := api.Group("/api/files") + apiFiles := api.Group("/files") { apiFiles.POST("", PostFile, middleware.BodyLimit("3MB")) }