-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug description
GetTasks endpoint does not work with ids parameter
Expected behaviour
When calling todoistApi.getTasks({ids: [1, 2]})
I should get only the tasks with id 1 and 2. (Of course assuming 1 and 2 are valid ids for my account).
However, I get all active tasks, the parameter is ignored.
Is reproducible
Yes
To reproduce
Use the getTasks()
call with one of your accounts and valid ids.
How to Fix
Your getTasks()
definition in typescript, specifically the GetTaskArgs
interface, expects ids to be of type number[]
. However, your endpoint expects the ids parameter as a string value with comma-separated ids. This clashes and the parameter is therefore ignored.
You can solve the issue by either calling toString()
on ids or by changing the type definition of the sdk.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working