Un-butcher task system.

This commit is contained in:
Dane Everitt
2017-04-15 13:52:43 -04:00
parent 0fe9a4566e
commit 7f1a97184b
12 changed files with 154 additions and 77 deletions

View File

@@ -70,7 +70,7 @@ class ServerController extends Controller
$server = Server::byUuid($uuid);
$request->user()->can('power-' . $request->input('action'), $server);
$repo = new PowerRepository($server);
$repo = new PowerRepository($server, $request->user());
$repo->do($request->input('action'));
return response('', 204)->header('Content-Type', 'application/json');
@@ -90,7 +90,7 @@ class ServerController extends Controller
$server = Server::byUuid($uuid);
$request->user()->can('send-command', $server);
$repo = new CommandRepository($server);
$repo = new CommandRepository($server, $request->user());
$repo->send($request->input('command'));
return response('', 204)->header('Content-Type', 'application/json');