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/checklists.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions backend/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
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.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": {
Expand Down
Loading