From c738cff381dc9be5677a03980b304bf8e15aa467 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 18 Feb 2025 00:27:28 +0800 Subject: [PATCH] :bug: Fix flag endpoint uses Get method --- pkg/internal/http/api/index.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/internal/http/api/index.go b/pkg/internal/http/api/index.go index 34b99a0..929d0d4 100644 --- a/pkg/internal/http/api/index.go +++ b/pkg/internal/http/api/index.go @@ -62,7 +62,7 @@ func MapAPIs(app *fiber.App, baseURL string) { posts.Get("/drafts", listDraftPost) posts.Get("/:postId", getPost) posts.Get("/:postId/insight", getPostInsight) - posts.Get("/:postId/flag", createFlag) + posts.Post("/:postId/flag", createFlag) posts.Post("/:postId/react", reactPost) posts.Post("/:postId/pin", pinPost) posts.Delete("/:postId", deletePost)