mirror of
https://github.com/grocy/grocy.git
synced 2025-08-17 19:16:37 +00:00
Added a new API endpoint to get all stock entries per location
References https://www.reddit.com/r/grocy/comments/srfwfs
This commit is contained in:
@@ -631,6 +631,11 @@ class StockApiController extends BaseApiController
|
||||
return $this->FilteredApiResponse($response, $this->getStockService()->GetProductStockEntries($args['productId'], false, $allowSubproductSubstitution, true), $request->getQueryParams());
|
||||
}
|
||||
|
||||
public function LocationStockEntries(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
{
|
||||
return $this->FilteredApiResponse($response, $this->getStockService()->GetLocationStockEntries($args['locationId']), $request->getQueryParams());
|
||||
}
|
||||
|
||||
public function ProductStockLocations(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
{
|
||||
$allowSubproductSubstitution = false;
|
||||
|
Reference in New Issue
Block a user