From cf959760f55c5b5de4b47404511efa4739eb51f8 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 11 Oct 2024 19:17:41 +0000 Subject: [PATCH] bug fixes --- Controller/ApiController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Controller/ApiController.php b/Controller/ApiController.php index af51850..f46ba74 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -496,7 +496,7 @@ final class ApiController extends Controller } /** @var \Modules\Support\Models\Ticket $ticket */ - $ticket = TicketMapper::get()->where('id', (int) $request->getData('id'))->execute(); + $ticket = TicketMapper::get()->where('id', (int) $request->getData('ref'))->execute(); $request->setData('virtualpath', $this->createTicketDir($ticket), true); $this->app->moduleManager->get('Editor', 'Api')->apiEditorCreate($request, $response, $data); @@ -512,7 +512,7 @@ final class ApiController extends Controller $this->createInvalidUpdateResponse($request, $response, $model); } - $this->createModelRelation($request->header->account, $request->getDataInt('id'), $model->id, TicketMapper::class, 'notes', '', $request->getOrigin()); + $this->createModelRelation($request->header->account, $request->getDataInt('ref'), $model->id, TicketMapper::class, 'notes', '', $request->getOrigin()); } /** @@ -544,7 +544,7 @@ final class ApiController extends Controller private function validateNoteCreate(RequestAbstract $request) : array { $val = []; - if (($val['id'] = !$request->hasData('id'))) { + if (($val['ref'] = !$request->hasData('ref'))) { return $val; }