mirror of
https://github.com/grocy/grocy.git
synced 2025-08-21 04:43:32 +00:00
Added option to include details in the webhook sent to label printers (#2704)
* Added option to include details in the webhook sent to label printers * Removed LABEL_PRINTER_INCLUDE_DETAILS flag * Make this actually work * Care about all places where webhooks are used / don't forget recipes --------- Co-authored-by: Bernd Bestel <bernd@berrnd.de>
This commit is contained in:
@@ -120,11 +120,12 @@ class ChoresApiController extends BaseApiController
|
||||
{
|
||||
try
|
||||
{
|
||||
$chore = $this->getDatabase()->chores()->where('id', $args['choreId'])->fetch();
|
||||
$choreDetails = (object)$this->getChoresService()->GetChoreDetails($args['choreId']);
|
||||
|
||||
$webhookData = array_merge([
|
||||
'chore' => $chore->name,
|
||||
'chore' => $choreDetails->chore->name,
|
||||
'grocycode' => (string)(new Grocycode(Grocycode::CHORE, $args['choreId'])),
|
||||
'details' => $choreDetails,
|
||||
], GROCY_LABEL_PRINTER_PARAMS);
|
||||
|
||||
if (GROCY_LABEL_PRINTER_RUN_SERVER)
|
||||
|
Reference in New Issue
Block a user