Fix avatars

This commit is contained in:
Jake Barnby 2026-01-13 18:05:46 +13:00
parent 2d6348bf5d
commit 3d27b76051
7 changed files with 7 additions and 7 deletions

View file

@ -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);

View file

@ -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);
}
}

View file

@ -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);

View file

@ -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'] ?? '';

View file

@ -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'] ?? '';

View file

@ -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);
}
}

View file

@ -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);
}
}