Add Archive download to Api v2 orders

This commit is contained in:
Benoît Burnichon
2016-05-20 13:16:41 +02:00
parent db3bb2d4c4
commit 2547ef14fa
6 changed files with 120 additions and 8 deletions

View File

@@ -56,6 +56,8 @@ class V2 implements ControllerProviderInterface, ServiceProviderInterface
return (new ApiOrderController($app))
->setDispatcher($app['dispatcher'])
->setEntityManagerLocator(new LazyLocator($app, 'orm.em'))
->setDelivererLocator(new LazyLocator($app, 'phraseanet.file-serve'))
->setFileSystemLocator(new LazyLocator($app, 'filesystem'))
->setJsonBodyHelper($app['json.body_helper']);
}
);
@@ -116,6 +118,10 @@ class V2 implements ControllerProviderInterface, ServiceProviderInterface
->assert('orderId', '\d+')
->bind('api_v2_orders_deny');
$controllers->get('/orders/{orderId}/archive', 'controller.api.v2.orders:getArchiveAction')
->assert('orderId', '\d+')
->bind('api_v2_orders_archive');
return $controllers;
}