mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-23 03:34:22 -05:00
(Update) CRUDDY PT.4 🚀
This commit is contained in:
@@ -33,13 +33,13 @@ class ThankController extends Controller
|
||||
$torrent = Torrent::findOrFail($id);
|
||||
|
||||
if ($user->id === $torrent->user_id) {
|
||||
return redirect()->route('torrent', ['slug' => $torrent->slug, 'id' => $torrent->id])
|
||||
return redirect()->route('torrent', ['id' => $torrent->id])
|
||||
->withErrors('You Cannot Thank Your Own Torrent!');
|
||||
}
|
||||
|
||||
$thank = Thank::where('user_id', '=', $user->id)->where('torrent_id', '=', $torrent->id)->first();
|
||||
if ($thank) {
|
||||
return redirect()->route('torrent', ['slug' => $torrent->slug, 'id' => $torrent->id])
|
||||
return redirect()->route('torrent', ['id' => $torrent->id])
|
||||
->withErrors('You Have Already Thanked On This Torrent!');
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class ThankController extends Controller
|
||||
$torrent->notifyUploader('thank', $thank);
|
||||
}
|
||||
|
||||
return redirect()->route('torrent', ['slug' => $torrent->slug, 'id' => $torrent->id])
|
||||
return redirect()->route('torrent', ['id' => $torrent->id])
|
||||
->withSuccess('Your Thank Was Successfully Applied!');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user