Skip to content

Commit 0f435ad

Browse files
Merge pull request #51 from IFRCGo/staging
Staging
2 parents d932a26 + 3c808ad commit 0f435ad

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

app/Http/Controllers/OrganisationController.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function getAll(Request $request)
6868
{
6969
try {
7070
/** @var Collection $orgs */
71-
$orgs = $this->orgRepo->all();
71+
$orgs = $this->orgRepo->all()->load('details');
7272
} catch (\Exception $e) {
7373
Log::error('Could not get Organisations list', ['message' => $e->getMessage()]);
7474

@@ -79,10 +79,6 @@ public function getAll(Request $request)
7979
], 500);
8080
}
8181

82-
$orgs->each(function (Organisation $org) {
83-
$org->load('details');
84-
});
85-
8682
$resource = new \League\Fractal\Resource\Collection($orgs, new OrganisationTransformer([
8783
'unpublished' => $request->header('x-api-key') ? false : true,
8884
]));

0 commit comments

Comments
 (0)