diff --git a/controllers/StockApiController.php b/controllers/StockApiController.php index ae793e14..94fd5ade 100644 --- a/controllers/StockApiController.php +++ b/controllers/StockApiController.php @@ -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); diff --git a/routes.php b/routes.php index 05829647..ff463c9f 100644 --- a/routes.php +++ b/routes.php @@ -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