Skip to content

Commit

Permalink
query for account id on UsersFactory::me
Browse files Browse the repository at this point in the history
Resolves an issue brought up in #186 where 'me' is no longer a valid parameter for getting the local user account.
  • Loading branch information
Tustin committed Oct 27, 2021
1 parent 9306794 commit 4a00f9b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Factory/UsersFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public function find(string $accountId) : User
*/
public function me() : User
{
return new User($this->getHttpClient(), 'me');
// Resolve account id
$response = $this->get('https://dms.api.playstation.com/api/v1/devices/accounts/me');
return new User($this->getHttpClient(), $response->accountId);
}
}

0 comments on commit 4a00f9b

Please sign in to comment.