Add API for Stock-Journal

This commit is contained in:
fipwmaqzufheoxq92ebc 2020-09-02 17:29:03 +02:00
parent abd2590979
commit 3c849885b3
No known key found for this signature in database
GPG Key ID: F4DF989490C2ADB7
2 changed files with 6 additions and 0 deletions

View File

@ -715,6 +715,11 @@ class StockApiController extends BaseApiController
}
}
public function Journal(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
{
return $this->FilteredApiResponse($response, $this->getDatabase()->uihelper_stock_journal(), $request->getQueryParams());
}
public function __construct(\DI\Container $container)
{
parent::__construct($container);

View File

@ -203,6 +203,7 @@ $app->group('/api', function (RouteCollectorProxy $group) {
$group->post('/stock/transactions/{transactionId}/undo', '\Grocy\Controllers\StockApiController:UndoTransaction');
$group->get('/stock/barcodes/external-lookup/{barcode}', '\Grocy\Controllers\StockApiController:ExternalBarcodeLookup');
$group->get('/productbarcodedetails/{barcode}', '\Grocy\Controllers\StockApiController:ProductBarcodeDetails');
$group->get('/stock/journal', '\Grocy\Controllers\StockApiController:Journal');
}
// Shopping list