From 35fd895c99d9b7cfc5c094b1b1e5c4486a0a55dc Mon Sep 17 00:00:00 2001 From: Yamil Date: Tue, 20 Dec 2022 21:41:04 +0500 Subject: [PATCH] Filter section condition invert --- src/FabianBeiner/Todoist/TodoistSectionsTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FabianBeiner/Todoist/TodoistSectionsTrait.php b/src/FabianBeiner/Todoist/TodoistSectionsTrait.php index 81b4ec6..977dda8 100644 --- a/src/FabianBeiner/Todoist/TodoistSectionsTrait.php +++ b/src/FabianBeiner/Todoist/TodoistSectionsTrait.php @@ -30,10 +30,10 @@ public function getAllSections(?string $projectId = null): bool|array { if ( ! $this->validateId($projectId)) { /** @var object $result Result of the GET request. */ - $result = $this->get('sections?project_id=' . $projectId); + $result = $this->get('sections'); } else { /** @var object $result Result of the GET request. */ - $result = $this->get('sections'); + $result = $this->get('sections?project_id=' . $projectId); } return $this->handleResponse($result->getStatusCode(), $result->getBody()->getContents());