diff --git a/backend/scenarios.go b/backend/scenarios.go index 24fb583..cb7bf0c 100644 --- a/backend/scenarios.go +++ b/backend/scenarios.go @@ -75,13 +75,13 @@ func (p *bddPlugin) createScenario(req *plugin.Request, res *plugin.Response) { return } - type body struct { + type createScenarioBody struct { Title string `json:"title"` Given string `json:"given"` When string `json:"when"` Then string `json:"then"` } - b, err := plugin.JSONBody[body](req) + b, err := plugin.JSONBody[createScenarioBody](req) if err != nil || b.Title == "" { res.Error(400, "title is required") return @@ -157,13 +157,13 @@ func (p *bddPlugin) updateScenario(req *plugin.Request, res *plugin.Response) { return } - type body struct { + type updateScenarioBody struct { Title *string `json:"title"` Given *string `json:"given"` When *string `json:"when"` Then *string `json:"then"` } - b, err := plugin.JSONBody[body](req) + b, err := plugin.JSONBody[updateScenarioBody](req) if err != nil { res.Error(400, "invalid request body") return diff --git a/plugin.json b/plugin.json index 99eb88c..b9d4294 100644 --- a/plugin.json +++ b/plugin.json @@ -2,7 +2,7 @@ "id": "com.paca.bdd", "displayName": "BDD Scenarios", "description": "Adds Given/When/Then BDD acceptance criteria to tasks.", - "version": "0.3.4", + "version": "0.3.5", "minCoreVersion": "v0.13.3", "permissions": ["db.read", "db.write", "events.subscribe"], "backend": {