Fix Task.tasks field type: rename Children []*Task to ChildIDs []int

The Checkvist API returns the 'tasks' field as an array of child task IDs
(integers), not as full Task objects. This was causing JSON unmarshal errors.

BREAKING CHANGE: Task.Children []*Task renamed to Task.ChildIDs []int
This commit is contained in:
Oliver Jakoubek 2026-01-18 14:41:42 +01:00
commit d92a1b90c2
5 changed files with 66 additions and 5 deletions

View file

@ -140,8 +140,8 @@ type Task struct {
UpdatedAt APITime `json:"updated_at"`
// CreatedAt is the timestamp when the task was created.
CreatedAt APITime `json:"created_at"`
// Children contains nested child tasks (when fetched with tree structure).
Children []*Task `json:"tasks,omitempty"`
// ChildIDs contains IDs of child tasks (returned by API as array of integers).
ChildIDs []int `json:"tasks,omitempty"`
// Notes contains the comments/notes attached to this task.
Notes []Note `json:"notes,omitempty"`
}