mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 01:18:37 +00:00
Fix avatars
This commit is contained in:
parent
2d6348bf5d
commit
3d27b76051
7 changed files with 7 additions and 7 deletions
|
|
@ -21,7 +21,7 @@ class Action extends PlatformAction
|
|||
return \dirname(__DIR__, 6);
|
||||
}
|
||||
|
||||
protected function avatarCallback(string $type, string $code, int $width, int $height, int $quality, Response $response, Authorization $authorization): void
|
||||
protected function avatar(string $type, string $code, int $width, int $height, int $quality, Response $response): void
|
||||
{
|
||||
$code = \strtolower($code);
|
||||
$type = \strtolower($type);
|
||||
|
|
|
|||
|
|
@ -59,6 +59,6 @@ class Get extends Action
|
|||
|
||||
public function action(string $code, int $width, int $height, int $quality, Response $response)
|
||||
{
|
||||
$this->avatarCallback('browsers', $code, $width, $height, $quality, $response);
|
||||
$this->avatar('browsers', $code, $width, $height, $quality, $response);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class Get extends Action
|
|||
$userId = $user->getId();
|
||||
$email = $user->getAttribute('email', '');
|
||||
|
||||
$gitHub = $this->getUserGitHub($user->getId(), $project, $dbForProject, $dbForPlatform, $logger);
|
||||
$gitHub = $this->getUserGitHub($user->getId(), $project, $dbForProject, $dbForPlatform, $logger, $authorization);
|
||||
$githubId = $gitHub['id'] ?? '';
|
||||
|
||||
$isHero = \array_key_exists($email, $heroes);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class Get extends Action
|
|||
$email = $user->getAttribute('email', '');
|
||||
$createdAt = new \DateTime($user->getCreatedAt());
|
||||
|
||||
$gitHub = $this->getUserGitHub($user->getId(), $project, $dbForProject, $dbForPlatform, $logger);
|
||||
$gitHub = $this->getUserGitHub($user->getId(), $project, $dbForProject, $dbForPlatform, $logger, $authorization);
|
||||
$githubName = $gitHub['name'] ?? '';
|
||||
$githubId = $gitHub['id'] ?? '';
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class Get extends Action
|
|||
$email = $user->getAttribute('email', '');
|
||||
$createdAt = new \DateTime($user->getCreatedAt());
|
||||
|
||||
$gitHub = $this->getUserGitHub($user->getId(), $project, $dbForProject, $dbForPlatform, $logger);
|
||||
$gitHub = $this->getUserGitHub($user->getId(), $project, $dbForProject, $dbForPlatform, $logger, $authorization);
|
||||
$githubName = $gitHub['name'] ?? '';
|
||||
$githubId = $gitHub['id'] ?? '';
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,6 @@ class Get extends Action
|
|||
|
||||
public function action(string $code, int $width, int $height, int $quality, Response $response)
|
||||
{
|
||||
$this->avatarCallback('credit-cards', $code, $width, $height, $quality, $response);
|
||||
$this->avatar('credit-cards', $code, $width, $height, $quality, $response);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,6 +59,6 @@ class Get extends Action
|
|||
|
||||
public function action(string $code, int $width, int $height, int $quality, Response $response)
|
||||
{
|
||||
$this->avatarCallback('flags', $code, $width, $height, $quality, $response);
|
||||
$this->avatar('flags', $code, $width, $height, $quality, $response);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue