From 9ca18f6b0d139e8b19b88f333cafee0acb208e87 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 24 Feb 2019 23:50:39 -0700 Subject: [PATCH] Update PublicApiController --- app/Http/Controllers/PublicApiController.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/PublicApiController.php b/app/Http/Controllers/PublicApiController.php index f12066cd..76a3fba9 100644 --- a/app/Http/Controllers/PublicApiController.php +++ b/app/Http/Controllers/PublicApiController.php @@ -252,8 +252,7 @@ class PublicApiController extends Controller 'local', 'created_at', 'updated_at' - ) - ->whereHas('media') + )->whereIn('type', ['photo', 'photo:album', 'video', 'video:album']) ->whereLocal(true) ->whereNull('uri') ->where('id', $dir, $id) @@ -280,7 +279,7 @@ class PublicApiController extends Controller 'local', 'created_at', 'updated_at' - )->whereHas('media') + )->whereIn('type', ['photo', 'photo:album', 'video', 'video:album']) ->whereLocal(true) ->whereNull('uri') ->whereNotIn('profile_id', $filtered) @@ -354,8 +353,7 @@ class PublicApiController extends Controller 'local', 'created_at', 'updated_at' - ) - ->whereHas('media') + )->whereIn('type', ['photo', 'photo:album', 'video', 'video:album']) ->whereLocal(true) ->whereNull('uri') ->where('id', $dir, $id) @@ -383,7 +381,7 @@ class PublicApiController extends Controller 'local', 'created_at', 'updated_at' - )->whereHas('media') + )->whereIn('type', ['photo', 'photo:album', 'video', 'video:album']) ->whereLocal(true) ->whereNull('uri') ->whereIn('profile_id', $following)