Incidents will now be removed via the command
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
namespace CachetHQ\Cachet\Http\Controllers\Dashboard;
|
||||
|
||||
use AltThree\Validator\ValidationException;
|
||||
use CachetHQ\Cachet\Commands\Incident\RemoveIncidentCommand;
|
||||
use CachetHQ\Cachet\Events\Incident\IncidentWasReportedEvent;
|
||||
use CachetHQ\Cachet\Facades\Setting;
|
||||
use CachetHQ\Cachet\Models\Component;
|
||||
@@ -19,6 +20,7 @@ use CachetHQ\Cachet\Models\ComponentGroup;
|
||||
use CachetHQ\Cachet\Models\Incident;
|
||||
use CachetHQ\Cachet\Models\IncidentTemplate;
|
||||
use GrahamCampbell\Binput\Facades\Binput;
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Routing\Controller;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
use Illuminate\Support\Facades\Redirect;
|
||||
@@ -27,6 +29,8 @@ use Jenssegers\Date\Date;
|
||||
|
||||
class IncidentController extends Controller
|
||||
{
|
||||
use DispatchesJobs;
|
||||
|
||||
/**
|
||||
* Stores the sub-sidebar tree list.
|
||||
*
|
||||
@@ -208,7 +212,7 @@ class IncidentController extends Controller
|
||||
*/
|
||||
public function deleteIncidentAction(Incident $incident)
|
||||
{
|
||||
$incident->delete();
|
||||
$this->dispatch(new RemoveIncidentCommand($incident));
|
||||
|
||||
return Redirect::route('dashboard.incidents.index');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user