From 0ba62fe9ebe05c0ccf70d1390e2f7724c751a127 Mon Sep 17 00:00:00 2001 From: minodisk Date: Wed, 7 Jan 2026 22:01:19 +0900 Subject: [PATCH] fix: accept plugin_unique_identifier from query params for DecodePluginFromIdentifier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed the struct tag from `json:` to `form:` for PluginUniqueIdentifier field in DecodePluginFromIdentifier handler. This allows the parameter to be bound from query string instead of JSON body. This is consistent with similar GET endpoints (FetchPluginManifest, FetchPluginFromIdentifier) which already use `form:` tags. The change is needed because: - GET requests with body are rejected by some HTTP intermediaries (e.g., Cloud Run) - HTTP standards state that GET request body has no defined semantics - Query parameters are the appropriate way to pass data in GET requests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- internal/server/controllers/plugins.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/server/controllers/plugins.go b/internal/server/controllers/plugins.go index 59ae1dbd6..765fc7281 100644 --- a/internal/server/controllers/plugins.go +++ b/internal/server/controllers/plugins.go @@ -164,7 +164,7 @@ func ReinstallPluginFromIdentifier(app *app.Config) gin.HandlerFunc { func DecodePluginFromIdentifier(app *app.Config) gin.HandlerFunc { return func(c *gin.Context) { BindRequest(c, func(request struct { - PluginUniqueIdentifier plugin_entities.PluginUniqueIdentifier `json:"plugin_unique_identifier" validate:"required,plugin_unique_identifier"` + PluginUniqueIdentifier plugin_entities.PluginUniqueIdentifier `form:"plugin_unique_identifier" validate:"required,plugin_unique_identifier"` }) { c.JSON(http.StatusOK, service.DecodePluginFromIdentifier(app, request.PluginUniqueIdentifier)) })