Refactored Controllers.
This commit is contained in:
parent
7abd3febc1
commit
ba0d9f14fa
20 changed files with 514 additions and 514 deletions
|
|
@ -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']);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue