Skip to content

Commit 2e6fcfd

Browse files
authored
Merge pull request #22 from yamilramilev/main
Fixed `getAllSections` to use `projectId` correctly
2 parents c755686 + 35fd895 commit 2e6fcfd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/FabianBeiner/Todoist/TodoistSectionsTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ public function getAllSections(?string $projectId = null): bool|array
3030
{
3131
if ( ! $this->validateId($projectId)) {
3232
/** @var object $result Result of the GET request. */
33-
$result = $this->get('sections?project_id=' . $projectId);
33+
$result = $this->get('sections');
3434
} else {
3535
/** @var object $result Result of the GET request. */
36-
$result = $this->get('sections');
36+
$result = $this->get('sections?project_id=' . $projectId);
3737
}
3838

3939
return $this->handleResponse($result->getStatusCode(), $result->getBody()->getContents());

0 commit comments

Comments
 (0)