Update Api Transformers, fixes #2234

pull/2220/head
Daniel Supernault 2020-06-12 23:12:15 -06:00
rodzic 344b0c94cd
commit 6300789115
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
2 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -37,10 +37,10 @@ class NotificationTransformer extends Fractal\TransformerAbstract
if($status) {
return $this->item($status, new StatusTransformer());
} else {
return null;
return $this->collection([], new StatusTransformer());
}
} else {
return null;
return $this->collection([], new StatusTransformer());
}
}

Wyświetl plik

@ -63,6 +63,8 @@ class StatusTransformer extends Fractal\TransformerAbstract
if(in_array($status->type, ['photo', 'video', 'photo:album', 'loop', 'photo:video:album'])) {
$media = $status->media()->orderBy('order')->get();
return $this->collection($media, new MediaTransformer());
} else {
return $this->collection([], new MediaTransformer());
}
});
}