Fixes featured torrents not being set to freeleech and doubleup when uploaded via API

This commit is contained in:
PyR8zdl
2020-08-07 17:26:30 -05:00
parent a335bd89c3
commit 4cb4dfd17a

View File

@@ -135,6 +135,12 @@ class TorrentController extends BaseController
$torrent->moderated_at = Carbon::now();
$torrent->moderated_by = User::where('username', 'System')->first()->id; //System ID
// Set freeleech and doubleup if featured
if ($torrent->featured == 1) {
$torrent->free = '1';
$torrent->doubleup = '1';
}
// Validation
$v = \validator($torrent->toArray(), [
'name' => 'required|unique:torrents',