Skip to content

Commit

Permalink
Fix v9 api projects
Browse files Browse the repository at this point in the history
  • Loading branch information
pilulu committed Jun 17, 2024
1 parent 9f96d97 commit c307b81
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/TogglApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public function deleteProjectGroups($projectGroupIds)
*/
public function createProject($project)
{
return $this->POST("workspaces/{$this->workspaceId}/projects", ['project' => $project]);
return $this->POST("workspaces/{$this->workspaceId}/projects", $project);
}

/**
Expand All @@ -368,7 +368,7 @@ public function createProject($project)
*/
public function updateProject($projectId, $project)
{
return $this->PUT("workspaces/{$this->workspaceId}/projects/{$projectId}", ['project' => $project]);
return $this->PUT("workspaces/{$this->workspaceId}/projects/{$projectId}", $project);
}

/**
Expand All @@ -383,18 +383,6 @@ public function deleteProject($projectId)
return $this->DELETE('projects/'.$projectId);
}

/**
* Delete multiple projects.
*
* @param array $projectIds
*
* @return bool|mixed|object
*/
public function deleteProjects($projectIds)
{
return $this->DELETE('projects/'.implode(',', $projectIds));
}

/**
* Get project user relations.
*
Expand Down

0 comments on commit c307b81

Please sign in to comment.