mirror of
https://github.com/Karaka-Management/oms-Support.git
synced 2026-01-11 00:58:41 +00:00
Test fixes
This commit is contained in:
parent
de0445b026
commit
5ab5247fc5
|
|
@ -12,7 +12,7 @@
|
|||
},
|
||||
"creator": {
|
||||
"name": "Jingga",
|
||||
"website": "jingga.app"
|
||||
"website": "https://jingga.app"
|
||||
},
|
||||
"description": "The shop application.",
|
||||
"directory": "Shop",
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ use Modules\Support\Models\TicketMapper;
|
|||
use Modules\Tasks\Models\TaskElementMapper;
|
||||
use Modules\Tasks\Models\TaskMapper;
|
||||
use Modules\Tasks\Models\TaskStatus;
|
||||
use Modules\Tasks\Models\TaskType;
|
||||
use phpOMS\Message\Http\RequestStatusCode;
|
||||
use phpOMS\Message\RequestAbstract;
|
||||
use phpOMS\Message\ResponseAbstract;
|
||||
|
|
@ -393,7 +392,11 @@ final class ApiController extends Controller
|
|||
$this->app->moduleManager->get('Tasks')->apiTaskElementSet($request, $response);
|
||||
|
||||
/** @var \Modules\Tasks\Models\TaskElement $new */
|
||||
$new = $response->getDataArray($request->uri->__toString())['response'];
|
||||
$new = $response->getDataArray($request->uri->__toString())['response'] ?? null;
|
||||
if ($new === null) {
|
||||
$response->header->status = RequestStatusCode::R_400;
|
||||
$this->createInvalidUpdateResponse($request, $response, $new);
|
||||
}
|
||||
|
||||
$ticket = TicketMapper::get()
|
||||
->with('task')
|
||||
|
|
@ -503,7 +506,12 @@ final class ApiController extends Controller
|
|||
}
|
||||
|
||||
/** @var \Modules\Editor\Models\EditorDoc $model */
|
||||
$model = $response->getDataArray($request->uri->__toString())['response'];
|
||||
$model = $response->getDataArray($request->uri->__toString())['response'] ?? null;
|
||||
if ($model === null) {
|
||||
$response->header->status = RequestStatusCode::R_400;
|
||||
$this->createInvalidUpdateResponse($request, $response, $model);
|
||||
}
|
||||
|
||||
$this->createModelRelation($request->header->account, $request->getDataInt('id'), $model->id, TicketMapper::class, 'notes', '', $request->getOrigin());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
# Structure
|
||||
|
||||
## ER
|
||||
|
||||

|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 162 KiB |
|
|
@ -12,7 +12,7 @@
|
|||
},
|
||||
"creator": {
|
||||
"name": "Jingga",
|
||||
"website": "jingga.app"
|
||||
"website": "https://jingga.app"
|
||||
},
|
||||
"description": "Support module.",
|
||||
"directory": "Support",
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ declare(strict_types=1);
|
|||
namespace Modules\Support\tests\Models;
|
||||
|
||||
use Modules\Support\Models\Ticket;
|
||||
use Modules\Support\Models\TicketElement;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user