Skip to content

Commit 8ddd19c

Browse files
fix: Don't force projectId for fetching sections (#395)
1 parent c48efb8 commit 8ddd19c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/todoist-api.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -819,10 +819,11 @@ export class TodoistApi {
819819
/**
820820
* Retrieves all sections within a specific project or matching criteria.
821821
*
822-
* @param args - Filter parameters such as project ID.
822+
* @param args - Filter parameters such as project ID. If no projectId is provided,
823+
* all sections are returned.
823824
* @returns A promise that resolves to an array of sections.
824825
*/
825-
async getSections(args: GetSectionsArgs): Promise<GetSectionsResponse> {
826+
async getSections(args?: GetSectionsArgs): Promise<GetSectionsResponse> {
826827
const {
827828
data: { results, nextCursor },
828829
} = await request<GetSectionsResponse>({

0 commit comments

Comments
 (0)