Update PublicApiController

This commit is contained in:
Daniel Supernault 2019-08-17 01:42:21 -06:00
parent bd61a921e8
commit 94e444267f
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -269,6 +269,7 @@ class PublicApiController extends Controller
'local', 'local',
'reply_count', 'reply_count',
'comments_disabled', 'comments_disabled',
'place_id',
'created_at', 'created_at',
'updated_at' 'updated_at'
)->where('id', $dir, $id) )->where('id', $dir, $id)
@ -299,6 +300,7 @@ class PublicApiController extends Controller
'reply_count', 'reply_count',
'comments_disabled', 'comments_disabled',
'created_at', 'created_at',
'place_id',
'updated_at' 'updated_at'
)->whereIn('type', ['photo', 'photo:album', 'video', 'video:album']) )->whereIn('type', ['photo', 'photo:album', 'video', 'video:album'])
->with('profile', 'hashtags', 'mentions') ->with('profile', 'hashtags', 'mentions')
@ -377,6 +379,7 @@ class PublicApiController extends Controller
'local', 'local',
'reply_count', 'reply_count',
'comments_disabled', 'comments_disabled',
'place_id',
'created_at', 'created_at',
'updated_at' 'updated_at'
)->whereIn('type', ['photo', 'photo:album', 'video', 'video:album']) )->whereIn('type', ['photo', 'photo:album', 'video', 'video:album'])
@ -405,6 +408,7 @@ class PublicApiController extends Controller
'local', 'local',
'reply_count', 'reply_count',
'comments_disabled', 'comments_disabled',
'place_id',
'created_at', 'created_at',
'updated_at' 'updated_at'
)->whereIn('type', ['photo', 'photo:album', 'video', 'video:album']) )->whereIn('type', ['photo', 'photo:album', 'video', 'video:album'])
@ -523,7 +527,9 @@ class PublicApiController extends Controller
public function relationships(Request $request) public function relationships(Request $request)
{ {
abort_if(!Auth::check(), 403); if(!Auth::check()) {
return response()->json([]);
}
$this->validate($request, [ $this->validate($request, [
'id' => 'required|array|min:1|max:20', 'id' => 'required|array|min:1|max:20',