From 89221ff20ebcb4e7c55ca1999b6ccd5e1f3f61c6 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 24 Jun 2021 00:09:23 +0200 Subject: [PATCH] fix l11n call --- Controller/ApiController.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Controller/ApiController.php b/Controller/ApiController.php index dbb4ada..284c217 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -324,18 +324,9 @@ final class ApiController extends Controller } $attrType = $this->createSupplierAttributeTypeFromRequest($request); + $attrType->setL11n($request->getData('title'), $request->getData('language')); $this->createModel($request->header->account, $attrType, SupplierAttributeTypeMapper::class, 'attr_type', $request->getOrigin()); - $l11nRequest = new HttpRequest($request->uri); - $l11nRequest->setData('type', $attrType->getId()); - $l11nRequest->setData('title', $request->getData('title')); - $l11nRequest->setData('language', $request->getData('language')); - - $l11nAttributeType = $this->createSupplierAttributeTypeL11nFromRequest($l11nRequest); - $this->createModel($request->header->account, $l11nAttributeType, SupplierAttributeTypeL11nMapper::class, 'attr_type_l11n_create', $request->getOrigin()); - - $attrType->setL11n($l11nAttributeType); - $this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Attribute type', 'Attribute type successfully created', $attrType); }