mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-01-26 13:59:29 -06:00
Fixes featured torrents not being set to freeleech and doubleup when uploaded via API
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user