Skip to content

Commit

Permalink
Merge branch '11.9' into 11.10
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Apr 30, 2023
2 parents 3548b4a + 148ed10 commit 88a0cb7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Add support for `access_level` in `Projects::createProjectAccessToken`
* Add support for `expires_at` in `Projects::addMember` and `Projects::saveMember`

## [11.9.1] - 2023-04-30

* Corrected upload avatar endpoint

## [11.9.0] - 2023-03-06

* Add PHP 8.2 support
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Projects.php
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ public function uploadFile($project_id, string $file)
*/
public function uploadAvatar($project_id, string $file)
{
return $this->put($this->getProjectPath($project_id, ''), [], [], ['avatar' => $file]);
return $this->put('projects/'.self::encodePath($project_id), [], [], ['avatar' => $file]);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Api/ProjectsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2842,7 +2842,7 @@ public function shouldUploadAvatar(): void
$api = $this->getApiMock();
$api->expects($this->once())
->method('put')
->with('projects/1/', [], [], ['avatar' => $fileName])
->with('projects/1', [], [], ['avatar' => $fileName])
->will($this->returnValue($expectedArray));
$this->assertEquals($expectedArray, $api->uploadAvatar(1, $fileName));
\unlink($fileName);
Expand Down

0 comments on commit 88a0cb7

Please sign in to comment.