update: announce controller

This commit is contained in:
HDVinnie
2020-06-03 14:30:24 -04:00
parent d06d994e95
commit 4c28a4ebf7
+5 -11
View File
@@ -96,7 +96,7 @@ class AnnounceController extends Controller
/**
* Dispatch The Specfic Annnounce Event Job
*/
//$this->sendAnnounceJob($queries, $user, $torrent);
$this->sendAnnounceJob($queries, $user, $torrent);
} catch (TrackerException $exception) {
$rep_dict = $this->generateFailedAnnounceResponse($exception);
} finally {
@@ -353,19 +353,13 @@ class AnnounceController extends Controller
*/
private function sendAnnounceJob($queries, $user, $torrent)
{
if(strtolower($queries['event']) == 'started') {
if (strtolower($queries['event']) == 'started') {
ProcessStartedAnnounceRequest::dispatchNow($queries, $user, $torrent);
}
if(strtolower($queries['event']) == 'completed') {
} elseif (strtolower($queries['event']) == 'completed') {
ProcessCompletedAnnounceRequest::dispatchNow($queries, $user, $torrent);
}
if(strtolower($queries['event']) == 'stopped') {
} elseif (strtolower($queries['event']) == 'stopped') {
ProcessStoppedAnnounceRequest::dispatchNow($queries, $user, $torrent);
}
if(strtolower($queries['event']) == '') {
} else {
ProcessBasicAnnounceRequest::dispatchNow($queries, $user, $torrent);
}
}