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:
parent
536ccf6ccf
commit
d92a1b90c2
5 changed files with 66 additions and 5 deletions
|
|
@ -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"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue