response->abort should just be abort()

This commit is contained in:
2017-09-20 11:57:33 +02:00
parent eac5560554
commit 7103835d03

View File

@@ -156,7 +156,7 @@ QUERY;
*/
public function complete(Request $r, $year, $month, $day, $hour, $duration) {
if($duration <= 0) {
return response()->abort(404);
return abort(404);
}
$currentHour = new \DateTime();
@@ -166,7 +166,7 @@ QUERY;
while($duration--) {
$file = '/var/audio/uitzending/' . $currentHour->format('Ymd_Hi') . '.MP3';
if(!file_exists($file)) {
return response()->abort(404);
return abort(404);
}
$size += ($filesize = filesize($file));
@@ -198,7 +198,7 @@ QUERY;
}
if($range === null) {
response()->abort(416); // Requested Range Not Satisfiable
abort(416); // Requested Range Not Satisfiable
return;
}