Primo Committ
This commit is contained in:
19
vendor/facade/ignition/src/Http/Controllers/ShareReportController.php
vendored
Normal file
19
vendor/facade/ignition/src/Http/Controllers/ShareReportController.php
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Facade\Ignition\Http\Controllers;
|
||||
|
||||
use Facade\Ignition\Actions\ShareReportAction;
|
||||
use Facade\Ignition\Exceptions\UnableToShareErrorException;
|
||||
use Facade\Ignition\Http\Requests\ShareReportRequest;
|
||||
|
||||
class ShareReportController
|
||||
{
|
||||
public function __invoke(ShareReportRequest $request, ShareReportAction $shareReportAction)
|
||||
{
|
||||
try {
|
||||
return $shareReportAction->handle(json_decode($request->get('report'), true), $request->get('tabs'), $request->get('lineSelection'));
|
||||
} catch (UnableToShareErrorException $exception) {
|
||||
abort(500, 'Unable to share the error '.$exception->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user