Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions backend/scenarios.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Loading