mirror of
https://github.com/grocy/grocy.git
synced 2026-04-03 19:36: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
|
try
|
||||||
{
|
{
|
||||||
$batteryDetails = $this->getBatteriesService()->GetBatteryDetails($args['batteryId']);
|
$batteryDetails = (object)$this->getBatteriesService()->GetBatteryDetails($args['batteryId']);
|
||||||
|
|
||||||
$webhookData = array_merge([
|
$webhookData = array_merge([
|
||||||
'battery' => $batteryDetails->battery->name,
|
'battery' => $batteryDetails->battery->name,
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ class ChoresApiController extends BaseApiController
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$choreDetails = $this->getChoresService()->GetChoreDetails($args['choreId']);
|
$choreDetails = (object)$this->getChoresService()->GetChoreDetails($args['choreId']);
|
||||||
|
|
||||||
$webhookData = array_merge([
|
$webhookData = array_merge([
|
||||||
'chore' => $choreDetails->chore->name,
|
'chore' => $choreDetails->chore->name,
|
||||||
|
|
|
||||||
|
|
@ -672,11 +672,11 @@ class StockApiController extends BaseApiController
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$productDetails = $this->getStockService()->GetProductDetails($args['productId']);
|
$productDetails = (object)$this->getStockService()->GetProductDetails($args['productId']);
|
||||||
|
|
||||||
$webhookData = array_merge([
|
$webhookData = array_merge([
|
||||||
'product' => $productDetails->product->name,
|
'product' => $productDetails->product->name,
|
||||||
'grocycode' => (string)(new Grocycode(Grocycode::PRODUCT, $product->id)),
|
'grocycode' => (string)(new Grocycode(Grocycode::PRODUCT, $productDetails->product->id)),
|
||||||
'details' => $productDetails,
|
'details' => $productDetails,
|
||||||
], GROCY_LABEL_PRINTER_PARAMS);
|
], GROCY_LABEL_PRINTER_PARAMS);
|
||||||
|
|
||||||
|
|
@ -698,7 +698,7 @@ class StockApiController extends BaseApiController
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$stockEntry = $this->getDatabase()->stock()->where('id', $args['entryId'])->fetch();
|
$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([
|
$webhookData = array_merge([
|
||||||
'product' => $productDetails->product->name,
|
'product' => $productDetails->product->name,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user