mirror of
https://github.com/Karaka-Management/oms-ClientManagement.git
synced 2026-01-11 15:28:41 +00:00
fix l11n create call
This commit is contained in:
parent
f3bd5c55c8
commit
9f0a488f22
|
|
@ -325,18 +325,9 @@ final class ApiController extends Controller
|
|||
}
|
||||
|
||||
$attrType = $this->createClientAttributeTypeFromRequest($request);
|
||||
$attrType->setL11n($request->getData('title'), $request->getData('language'));
|
||||
$this->createModel($request->header->account, $attrType, ClientAttributeTypeMapper::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->createClientAttributeTypeL11nFromRequest($l11nRequest);
|
||||
$this->createModel($request->header->account, $l11nAttributeType, ClientAttributeTypeL11nMapper::class, 'attr_type_l11n_create', $request->getOrigin());
|
||||
|
||||
$attrType->setL11n($l11nAttributeType);
|
||||
|
||||
$this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Attribute type', 'Attribute type successfully created', $attrType);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user