Rename incident events and fixes

This commit is contained in:
Joseph Cohen
2015-08-15 22:15:06 -05:00
committed by James Brooks
parent a93472f544
commit 64ff4d73c2
13 changed files with 116 additions and 20 deletions
@@ -11,7 +11,7 @@
namespace CachetHQ\Cachet\Http\Controllers\Api;
use CachetHQ\Cachet\Events\Incident\IncidentHasReportedEvent;
use CachetHQ\Cachet\Events\Incident\IncidentWasReportedEvent;
use CachetHQ\Cachet\Models\Incident;
use Exception;
use GrahamCampbell\Binput\Facades\Binput;
@@ -80,7 +80,7 @@ class IncidentController extends AbstractApiController
}
if (array_get($incidentData, 'notify') && subscribers_enabled()) {
event(new IncidentHasReportedEvent($incident));
event(new IncidentWasReportedEvent($incident));
}
return $this->item($incident);
@@ -46,7 +46,7 @@ class SubscriberController extends AbstractApiController
public function postSubscribers()
{
try {
$subscriber = $this->dispatch(new SubscribeSubscriberCommand(Binput::get('email'), Binput::get('verified', false)));
$subscriber = $this->dispatch(new SubscribeSubscriberCommand(Binput::get('email'), Binput::get('verify', false)));
} catch (Exception $e) {
throw new BadRequestHttpException();
}