diff --git a/backend/checklists.go b/backend/checklists.go index f0e94aa..98a2ef6 100644 --- a/backend/checklists.go +++ b/backend/checklists.go @@ -126,10 +126,10 @@ func (p *checklistPlugin) createChecklist(req *plugin.Request, res *plugin.Respo return } - type body struct { + type createChecklistBody struct { Title string `json:"title"` } - b, err := plugin.JSONBody[body](req) + b, err := plugin.JSONBody[createChecklistBody](req) if err != nil || b.Title == "" { res.Error(400, "title is required") return @@ -189,10 +189,10 @@ func (p *checklistPlugin) updateChecklist(req *plugin.Request, res *plugin.Respo return } - type body struct { + type updateChecklistBody struct { Title *string `json:"title"` } - b, err := plugin.JSONBody[body](req) + b, err := plugin.JSONBody[updateChecklistBody](req) if err != nil { res.Error(400, "invalid request body") return diff --git a/backend/items.go b/backend/items.go index ceee1cb..bbe70ec 100644 --- a/backend/items.go +++ b/backend/items.go @@ -50,10 +50,10 @@ func (p *checklistPlugin) createItem(req *plugin.Request, res *plugin.Response) return } - type body struct { + type createItemBody struct { Title string `json:"title"` } - b, err := plugin.JSONBody[body](req) + b, err := plugin.JSONBody[createItemBody](req) if err != nil || b.Title == "" { res.Error(400, "title is required") return @@ -117,12 +117,12 @@ func (p *checklistPlugin) updateItem(req *plugin.Request, res *plugin.Response) return } - type body struct { + type updateItemBody struct { Title *string `json:"title"` IsChecked *bool `json:"is_checked"` AssigneeID optionalString `json:"assignee_id"` } - b, err := plugin.JSONBody[body](req) + b, err := plugin.JSONBody[updateItemBody](req) if err != nil { res.Error(400, "invalid request body") return diff --git a/plugin.json b/plugin.json index 8460b05..06391b0 100644 --- a/plugin.json +++ b/plugin.json @@ -2,7 +2,7 @@ "id": "com.paca.checklist", "displayName": "Checklist", "description": "Adds named checklists with checkable items to tasks.", - "version": "0.2.10", + "version": "0.2.11", "minCoreVersion": "v0.13.3", "permissions": ["db.read", "db.write", "events.subscribe"], "backend": {