|
@@ 569-571 (lines=3) @@
|
| 566 |
|
|
| 567 |
|
if( ( $id = $view->param( 'id' ) ) == null ) |
| 568 |
|
{ |
| 569 |
|
if( ( $request = json_decode( $body ) ) === null || !isset( $request->data ) || !is_array( $request->data ) ) { |
| 570 |
|
throw new \Aimeos\Admin\JsonAdm\Exception( sprintf( 'Invalid JSON in body' ), 400 ); |
| 571 |
|
} |
| 572 |
|
|
| 573 |
|
$ids = array(); |
| 574 |
|
|
|
@@ 782-784 (lines=3) @@
|
| 779 |
|
*/ |
| 780 |
|
protected function patchItems( \Aimeos\MW\View\Iface $view, $body, array &$header ) |
| 781 |
|
{ |
| 782 |
|
if( ( $request = json_decode( $body ) ) === null || !isset( $request->data ) ) { |
| 783 |
|
throw new \Aimeos\Admin\JsonAdm\Exception( sprintf( 'Invalid JSON in body' ), 400 ); |
| 784 |
|
} |
| 785 |
|
|
| 786 |
|
$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), $this->getPath() ); |
| 787 |
|
|
|
@@ 823-825 (lines=3) @@
|
| 820 |
|
*/ |
| 821 |
|
protected function postItems( \Aimeos\MW\View\Iface $view, $body, array &$header ) |
| 822 |
|
{ |
| 823 |
|
if( ( $request = json_decode( $body ) ) === null || !isset( $request->data ) ) { |
| 824 |
|
throw new \Aimeos\Admin\JsonAdm\Exception( sprintf( 'Invalid JSON in body' ), 400 ); |
| 825 |
|
} |
| 826 |
|
|
| 827 |
|
if( isset( $request->data->id ) || $view->param( 'id' ) != null ) { |
| 828 |
|
throw new \Aimeos\Admin\JsonAdm\Exception( sprintf( 'Client generated IDs are not supported' ), 403 ); |