Refactored Controllers.

This commit is contained in:
Dmitry Khomutov 2018-03-13 20:09:54 +07:00
commit ba0d9f14fa
No known key found for this signature in database
GPG key ID: EC19426474B37AAC
20 changed files with 514 additions and 514 deletions

View file

@ -43,18 +43,6 @@ class WebhookController extends Controller
*/
protected $buildService;
/**
* @param Config $config
* @param Request $request
* @param Response $response
*/
public function __construct(Config $config, Request $request, Response $response)
{
$this->config = $config;
$this->request = $request;
$this->response = $response;
}
/**
* Initialise the controller, set up stores and services.
*/
@ -77,7 +65,7 @@ class WebhookController extends Controller
{
$response = new Response\JsonResponse();
try {
$data = call_user_func_array([$this, $action], $actionParams);
$data = parent::handleAction($action, $actionParams);
if (isset($data['responseCode'])) {
$response->setResponseCode($data['responseCode']);
unset($data['responseCode']);