Skip to content

Commit

Permalink
🐛 Move Project Task to workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonJnsson committed Sep 11, 2023
1 parent 85220bc commit f53c2aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/TogglApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -737,9 +737,9 @@ public function deleteTag($tagId)
/**
* @see TogglTrackWorkspaceApi::getTask()
*/
public function getTask($workspaceId, $taskId)
public function getTask($workspaceId, $projectId, $taskId)
{
return $this->workspace($workspaceId)->getTask($taskId);
return $this->workspace($workspaceId)->getTask($projectId, $taskId);
}

/**
Expand Down
5 changes: 3 additions & 2 deletions src/TogglTrackWorkspaceApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ public function deleteTask($projectId, $taskId)
*
* Tasks are available only for pro workspaces.
*
* @param int $projectId
* @param int $taskId
*
* @return bool|mixed|object
Expand All @@ -461,8 +462,8 @@ public function deleteTask($projectId, $taskId)
*
* @see https://github.com/toggl/toggl_api_docs/blob/master/chapters/tasks.md
*/
public function getTask($taskId)
public function getTask($projectId, $taskId)
{
return $this->GET('tasks/' . $taskId);
return $this->GET("projects/{$projectId}/tasks/{$taskId}");
}
}

0 comments on commit f53c2aa

Please sign in to comment.