1
0
Fork 0

Update BaseApiController

This commit is contained in:
Daniel Supernault 2019-06-03 13:12:37 -06:00
parent c4483b378f
commit 7869ee9a92
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 0 additions and 31 deletions

View File

@ -330,35 +330,4 @@ class BaseApiController extends Controller
return response()->json($res);
}
public function loops(Request $request)
{
abort_if(!Auth::check(), 403);
abort_if(!config('exp.loops'), 403);
// todo proper pagination, maybe LoopService
$loops = Status::whereType('video')
->latest()
->take(18)
->get();
$resource = new Fractal\Resource\Collection($loops, new StatusTransformer());
return $this->fractal->createData($resource)->toArray();
}
public function loopWatch(Request $request)
{
abort_if(!Auth::check(), 403);
abort_if(!config('exp.loops'), 403);
$this->validate($request, [
'id' => 'integer|min:1'
]);
$id = $request->input('id');
// todo log loops
return response()->json(200);
}
}