Skip to content

Commit

Permalink
Add full user response to PIREP API call
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeelio committed Apr 1, 2020
1 parent 072d5f7 commit 6f05dd6
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions app/Http/Resources/Pirep.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,7 @@ public function toArray($request)

$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'));

Expand Down

0 comments on commit 6f05dd6

Please sign in to comment.