logger moved to App::shutdown
This commit is contained in:
parent
59627ea9ef
commit
428adcf47f
1 changed files with 8 additions and 7 deletions
|
@ -68,10 +68,11 @@ $avatarCallback = function (string $type, string $code, int $width, int $height,
|
|||
|
||||
$data = $image->output($output, $quality);
|
||||
|
||||
$cache->save($key, $data);
|
||||
|
||||
App::setResource('cacheKey', fn () => $key);
|
||||
App::setResource('cachePath', fn () => 'app-0');
|
||||
|
||||
$cache->save($key, $data);
|
||||
|
||||
$response
|
||||
->setContentType('image/png')
|
||||
|
@ -194,11 +195,11 @@ App::get('/v1/avatars/image')
|
|||
|
||||
$data = $image->output($output, $quality);
|
||||
|
||||
$cache->save($key, $data);
|
||||
|
||||
App::setResource('cacheKey', fn () => $key);
|
||||
App::setResource('cachePath', fn () => 'app-0');
|
||||
|
||||
$cache->save($key, $data);
|
||||
|
||||
$response
|
||||
->setContentType('image/png')
|
||||
->addHeader('Expires', $date)
|
||||
|
@ -327,11 +328,11 @@ App::get('/v1/avatars/favicon')
|
|||
throw new Exception('Favicon not found', 404, Exception::AVATAR_ICON_NOT_FOUND);
|
||||
}
|
||||
|
||||
$cache->save($key, $data);
|
||||
|
||||
App::setResource('cacheKey', fn () => $key);
|
||||
App::setResource('cachePath', fn () => 'app-0');
|
||||
|
||||
$cache->save($key, $data);
|
||||
|
||||
return $response
|
||||
->setContentType('image/x-icon')
|
||||
->addHeader('Expires', $date)
|
||||
|
@ -353,11 +354,11 @@ App::get('/v1/avatars/favicon')
|
|||
|
||||
$data = $image->output($output, $quality);
|
||||
|
||||
$cache->save($key, $data);
|
||||
|
||||
App::setResource('cacheKey', fn () => $key);
|
||||
App::setResource('cachePath', fn () => 'app-0');
|
||||
|
||||
$cache->save($key, $data);
|
||||
|
||||
$response
|
||||
->setContentType('image/png')
|
||||
->addHeader('Expires', $date)
|
||||
|
|
Loading…
Reference in a new issue