Fixes part of #2775

This commit is contained in:
James Brooks
2018-01-21 18:49:12 +00:00
parent ad80726069
commit 7a4ec0535d
@@ -38,7 +38,7 @@ class IncidentUpdateController extends AbstractApiController
*/ */
public function index(Incident $incident) public function index(Incident $incident)
{ {
$updates = IncidentUpdate::orderBy('created_at', 'desc'); $updates = $incident->updates()->orderBy('created_at', 'desc');
if ($sortBy = Binput::get('sort')) { if ($sortBy = Binput::get('sort')) {
$direction = Binput::has('order') && Binput::get('order') == 'desc'; $direction = Binput::has('order') && Binput::get('order') == 'desc';