Make this actually work

This commit is contained in:
Bernd Bestel 2025-03-21 16:30:21 +01:00
parent 80b12dc142
commit 9fd976509c
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
3 changed files with 5 additions and 5 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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,