diff --git a/backend/plugin.go b/backend/plugin.go index 764a552..d7a0c85 100644 --- a/backend/plugin.go +++ b/backend/plugin.go @@ -89,12 +89,12 @@ func (p *examplePlugin) listHello(req *plugin.Request, res *plugin.Response) { } func (p *examplePlugin) createHello(req *plugin.Request, res *plugin.Response) { - type body struct { + type createHelloBody struct { Name string `json:"name"` TaskID string `json:"task_id"` } - payload, err := plugin.JSONBody[body](req) + payload, err := plugin.JSONBody[createHelloBody](req) if err != nil { res.Error(400, "invalid JSON body") return @@ -165,11 +165,11 @@ func (p *examplePlugin) updateHello(req *plugin.Request, res *plugin.Response) { return } - type body struct { + type updateHelloBody struct { Name string `json:"name"` } - payload, err := plugin.JSONBody[body](req) + payload, err := plugin.JSONBody[updateHelloBody](req) if err != nil { res.Error(400, "invalid JSON body") return diff --git a/plugin.json b/plugin.json index 3e69d0f..5183897 100644 --- a/plugin.json +++ b/plugin.json @@ -2,7 +2,7 @@ "id": "com.paca.example", "displayName": "Plugin SDK Hello World", "description": "Hello world examples for every Paca plugin SDK feature.", - "version": "0.1.1", + "version": "0.1.2", "minCoreVersion": "v0.13.3", "permissions": ["db.read", "db.write", "events.subscribe", "events.emit"], "backend": {