Skip to content

Commit f5e745a

Browse files
minodiskclaude
andauthored
fix: accept plugin_unique_identifier from query params for DecodePluginFromIdentifier (#593)
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 <noreply@anthropic.com>
1 parent e709d26 commit f5e745a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/server/controllers/plugins.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ func ReinstallPluginFromIdentifier(app *app.Config) gin.HandlerFunc {
166166
func DecodePluginFromIdentifier(app *app.Config) gin.HandlerFunc {
167167
return func(c *gin.Context) {
168168
BindRequest(c, func(request struct {
169-
PluginUniqueIdentifier plugin_entities.PluginUniqueIdentifier `json:"plugin_unique_identifier" validate:"required,plugin_unique_identifier"`
169+
PluginUniqueIdentifier plugin_entities.PluginUniqueIdentifier `form:"plugin_unique_identifier" validate:"required,plugin_unique_identifier"`
170170
}) {
171171
c.JSON(http.StatusOK, service.DecodePluginFromIdentifier(app, request.PluginUniqueIdentifier))
172172
})

0 commit comments

Comments
 (0)