1
0
Fork 0
mirror of synced 2024-10-02 02:07:04 +13:00

logger moved to App::shutdown

This commit is contained in:
shimon 2022-07-09 21:30:01 +03:00
parent 59627ea9ef
commit 428adcf47f

View file

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