mirror of
https://github.com/grocy/grocy.git
synced 2026-04-03 11:26:16 +02:00
Make this actually work
This commit is contained in:
parent
80b12dc142
commit
9fd976509c
|
|
@ -69,7 +69,7 @@ class BatteriesApiController extends BaseApiController
|
|||
{
|
||||
try
|
||||
{
|
||||
$batteryDetails = $this->getBatteriesService()->GetBatteryDetails($args['batteryId']);
|
||||
$batteryDetails = (object)$this->getBatteriesService()->GetBatteryDetails($args['batteryId']);
|
||||
|
||||
$webhookData = array_merge([
|
||||
'battery' => $batteryDetails->battery->name,
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ class ChoresApiController extends BaseApiController
|
|||
{
|
||||
try
|
||||
{
|
||||
$choreDetails = $this->getChoresService()->GetChoreDetails($args['choreId']);
|
||||
$choreDetails = (object)$this->getChoresService()->GetChoreDetails($args['choreId']);
|
||||
|
||||
$webhookData = array_merge([
|
||||
'chore' => $choreDetails->chore->name,
|
||||
|
|
|
|||
|
|
@ -672,11 +672,11 @@ class StockApiController extends BaseApiController
|
|||
{
|
||||
try
|
||||
{
|
||||
$productDetails = $this->getStockService()->GetProductDetails($args['productId']);
|
||||
$productDetails = (object)$this->getStockService()->GetProductDetails($args['productId']);
|
||||
|
||||
$webhookData = array_merge([
|
||||
'product' => $productDetails->product->name,
|
||||
'grocycode' => (string)(new Grocycode(Grocycode::PRODUCT, $product->id)),
|
||||
'grocycode' => (string)(new Grocycode(Grocycode::PRODUCT, $productDetails->product->id)),
|
||||
'details' => $productDetails,
|
||||
], GROCY_LABEL_PRINTER_PARAMS);
|
||||
|
||||
|
|
@ -698,7 +698,7 @@ class StockApiController extends BaseApiController
|
|||
try
|
||||
{
|
||||
$stockEntry = $this->getDatabase()->stock()->where('id', $args['entryId'])->fetch();
|
||||
$productDetails = $this->getStockService()->GetProductDetails($stockEntry->product_id);
|
||||
$productDetails = (object)$this->getStockService()->GetProductDetails($stockEntry->product_id);
|
||||
|
||||
$webhookData = array_merge([
|
||||
'product' => $productDetails->product->name,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user