Skip to content

Commit 10ad60e

Browse files
committed
Fixed the controller inheritance.
1 parent 3d25afa commit 10ad60e

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/Controller/ApiObjectsCategoriesController.php

+3-7
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
namespace Monarc\BackOffice\Controller;
99

10-
use Monarc\Core\Controller\Handler\AbstractRestfulControllerRequestHandler;
10+
use Laminas\Mvc\Controller\AbstractRestfulController;
1111
use Monarc\Core\Controller\Handler\ControllerRequestResponseHandlerTrait;
1212
use Monarc\Core\InputFormatter\ObjectCategory\ObjectCategoriesInputFormatter;
1313
use Monarc\Core\Service\ObjectCategoryService;
1414
use Monarc\Core\Validator\InputValidator\ObjectCategory\PostObjectCategoryDataInputValidator;
1515

16-
class ApiObjectsCategoriesController extends AbstractRestfulControllerRequestHandler
16+
class ApiObjectsCategoriesController extends AbstractRestfulController
1717
{
1818
use ControllerRequestResponseHandlerTrait;
1919

@@ -58,11 +58,7 @@ public function create($data)
5858

5959
$objectCategory = $this->objectCategoryService->create($data);
6060

61-
return $this->getSuccessfulJsonResponse([
62-
'categ' => [
63-
'id' => $objectCategory->getId(),
64-
],
65-
]);
61+
return $this->getSuccessfulJsonResponse(['categ' => ['id' => $objectCategory->getId()]]);
6662
}
6763

6864
/**

0 commit comments

Comments
 (0)