Skip to content

Commit

Permalink
Fix resposne code and ffmpeglocation
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelBelgium committed Jan 14, 2022
1 parent 3efb794 commit 5d2b69a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Controllers/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function convert(Request $request)
->audioQuality('0');

if(config('youtube-api.ffmpeg_path') !== null) {
$options->ffmpegLocation(config('youtube-api.ffmpeg_path'));
$options = $options->ffmpegLocation(config('youtube-api.ffmpeg_path'));
}
}
else
Expand Down Expand Up @@ -135,7 +135,7 @@ public function convert(Request $request)
}
catch (Exception $e)
{
return response()->json(['error' => true, 'message' => $e->getMessage()]);
return response()->json(['error' => true, 'message' => $e->getMessage()], Response::HTTP_BAD_REQUEST);
}
}

Expand Down

0 comments on commit 5d2b69a

Please sign in to comment.