Added achievement data

This commit is contained in:
2026-04-28 22:16:21 +10:00
parent 14aed7bf6e
commit b94b1d8ec2
43 changed files with 1559 additions and 130 deletions
@@ -11,13 +11,12 @@ use Inertia\Inertia;
class FlightProfileController extends Controller
{
public function profileData(User $user, string $view, ?int $selectedFlightId = null) : array {
$flights = $user->FlightController()->flights();
return [
'user' => $user,
'canEdit' => auth()->check() && auth()->id() === $user->id,
'flights' => UserFlightResource::collection($flights)->resolve(),
'initialView' => $view,
'selectedFlightId' => $selectedFlightId,
'flight_api_url' => '/data/user/'.$user->name.'/flights',
'isFollowing' => auth()->check() && auth()->user()->isFollowing($user),
];
}