Files
coolify/app/Http/Controllers/TeamAvatarController.php
T
6b07f03107 feat(terminal): interactive console mode for containers (docker attach) (#11538)
Co-authored-by: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com>
Co-authored-by: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: rosslh <ross@rosshill.ca>
2026-10-14 14:32:02 +02:00

23 lines
617 B
PHP

<?php
namespace App\Http\Controllers;
use App\Services\TeamAvatarStorageService;
use Illuminate\Http\Response;
class TeamAvatarController extends Controller
{
public function __invoke(int $team_id, TeamAvatarStorageService $avatarStorage): Response
{
$team = auth()->user()->teams()->whereKey($team_id)->firstOrFail();
$contents = $avatarStorage->teamContents($team);
abort_if($contents === null, 404);
return response($contents, 200, [
'Content-Type' => 'image/jpeg',
'Cache-Control' => 'private, max-age=31536000, immutable',
]);
}
}