diff --git a/app/Http/Controllers/Api/UserController.php b/app/Http/Controllers/Api/UserController.php index 092399a0..6e751b7e 100644 --- a/app/Http/Controllers/Api/UserController.php +++ b/app/Http/Controllers/Api/UserController.php @@ -77,7 +77,7 @@ class UserController extends Controller */ public function index(Request $request) { - return new UserResource(Auth::user()); + return $this->get(Auth::user()->id); } /** @@ -89,7 +89,11 @@ class UserController extends Controller */ public function get($id) { - return new UserResource($this->userRepo->find($id)); + $user = $this->userRepo + ->with(['airline', 'bids']) + ->find($id); + + return new UserResource($user); } /** diff --git a/app/Models/SimBriefXML.php b/app/Models/SimBriefXML.php index f30cc641..3ed1b00a 100644 --- a/app/Models/SimBriefXML.php +++ b/app/Models/SimBriefXML.php @@ -37,10 +37,10 @@ class SimBriefXML extends SimpleXMLElement $base_url = $this->fms_downloads->directory; // TODO: Put vmsACARS on top - if (!empty($this->fms_downloads->vma)) { + if (!empty($this->fms_downloads->vms)) { $fps[] = [ - 'name' => $this->fms_downloads->vma->name->__toString(), - 'url' => $base_url.$this->fms_downloads->vma->link, + 'name' => $this->fms_downloads->vms->name->__toString(), + 'url' => $base_url.$this->fms_downloads->vms->link, ]; }