Getting started on POST for ticket controller

remotes/upstream/api-rewrite
Mike Koch 7 years ago
parent dc0c8a351b
commit 843528252b

@ -2,6 +2,7 @@
namespace Controllers\Tickets;
use BusinessLogic\Tickets\TicketCreator;
use BusinessLogic\Tickets\TicketRetriever;
@ -14,4 +15,15 @@ class TicketController {
output($ticketRetriever->getTicketById($id, $hesk_settings, $userContext));
}
function post() {
global $applicationContext, $hesk_settings, $modsForHeskSettings, $userContext;
/* @var $ticketCreator TicketCreator */
$ticketCreator = $applicationContext->get[TicketCreator::class];
//-- TODO Parse POST data
$ticketCreator->createTicketByCustomer(null, $hesk_settings, $modsForHeskSettings, $userContext);
}
}

@ -17,4 +17,5 @@ hesk_load_api_database_functions();
require_once(__DIR__ . '/../inc/custom_fields.inc.php');
// Load the ApplicationContext
$applicationContext = new \ApplicationContext();
$applicationContext = new \ApplicationContext();
$modsForHeskSettings = mfh_getSettings();
Loading…
Cancel
Save