From 89f7ee22cf32c11e3c0eaa1f2201eb9461fdbd18 Mon Sep 17 00:00:00 2001 From: Stefan Hagspiel Date: Mon, 23 Oct 2023 13:45:39 +0200 Subject: [PATCH] fix comment delete request --- .../Bundle/OrderBundle/Controller/OrderCommentController.php | 2 +- .../Bundle/OrderBundle/Resources/config/pimcore/routing.yml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/CoreShop/Bundle/OrderBundle/Controller/OrderCommentController.php b/src/CoreShop/Bundle/OrderBundle/Controller/OrderCommentController.php index e7e833e676..15cb585755 100644 --- a/src/CoreShop/Bundle/OrderBundle/Controller/OrderCommentController.php +++ b/src/CoreShop/Bundle/OrderBundle/Controller/OrderCommentController.php @@ -85,7 +85,7 @@ public function deleteAction(Request $request): JsonResponse { $commentId = $this->getParameterFromRequest($request, 'id'); $objectNoteService = $this->get(NoteServiceInterface::class); - $commentEntity = $objectNoteService->getNoteById($commentId); + $commentEntity = $objectNoteService->getNoteById((int) $commentId); if ($commentEntity instanceof Note) { /** @psalm-suppress InternalMethod */ diff --git a/src/CoreShop/Bundle/OrderBundle/Resources/config/pimcore/routing.yml b/src/CoreShop/Bundle/OrderBundle/Resources/config/pimcore/routing.yml index 8a4eac0aa4..b953a5e92e 100755 --- a/src/CoreShop/Bundle/OrderBundle/Resources/config/pimcore/routing.yml +++ b/src/CoreShop/Bundle/OrderBundle/Resources/config/pimcore/routing.yml @@ -131,7 +131,9 @@ coreshop_admin_order_comments_add: coreshop_admin_order_comments_delete: path: /%coreshop.admin.route.base%/order-comment/delete defaults: { _controller: 'coreshop.pimcore_controller.order_comment:deleteAction'} - + options: + expose: true + ##### ORDER SHIPMENT coreshop_admin_order_shipment_get_processable_items: path: /%coreshop.admin.route.base%/order-shipment/get-ship-able-items