Add full user response to PIREP API call

This commit is contained in:
Nabeel Shahzad 2020-03-31 23:32:50 -04:00
parent 072d5f76bb
commit 6f05dd6c86

View File

@ -69,13 +69,7 @@ class Pirep extends Resource
$res['position'] = Acars::make($this->whenLoaded('position'));
$res['comments'] = PirepComment::make($this->whenLoaded('comments'));
$res['user'] = [
'id' => $this->user->id,
'name' => $this->user->name,
'avatar' => $this->user->resolveAvatarUrl(),
'home_airport_id' => $this->user->home_airport_id,
'curr_airport_id' => $this->user->curr_airport_id,
];
$res['user'] = User::make($this->whenLoaded('user'));
$res['flight'] = Flight::make($this->whenLoaded('flight'));