Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Fix invite endpoint body

Co-authored-by: Pavel Stejskal <spajxo@gmail.com>
  • Loading branch information
tomasDostalDS and spajxo authored May 17, 2024
1 parent fb45dfd commit 7a49138
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Endpoint/AccountUsersEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function disinvite(string $id): void
*/
public function invite(array $body): User
{
return $this->makeResource($this->postRequest('/invite', ['input' => $body]));
return $this->makeResource($this->postRequest('/invite', ['json' => $body]));
}

public function reinvite(string $id): User
Expand Down
2 changes: 1 addition & 1 deletion tests/Endpoint/AccountUsersEndpointTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function testDisinvite(): void
public function testInvite(): void
{
self::endpoint()->invite(['foo' => 'bar']);
self::assertLastRequest('POST', '/api/account/users/invite');
self::assertLastRequest('POST', '/api/account/users/invite', ['foo' => 'bar']);
}

public function testReinvite(): void
Expand Down

0 comments on commit 7a49138

Please sign in to comment.