diff --git a/controllers/StockApiController.php b/controllers/StockApiController.php index 5bc8c7cb..e25c1144 100644 --- a/controllers/StockApiController.php +++ b/controllers/StockApiController.php @@ -626,7 +626,7 @@ class StockApiController extends BaseApiController (new WebhookRunner())->run(GROCY_LABEL_PRINTER_WEBHOOK, $webhookData, GROCY_LABEL_PRINTER_HOOK_JSON); } - return $this->EmptyApiResponse($response); + return $this->ApiResponse($response, $webhookData); } public function StockEntryPrintLabel(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args) @@ -649,7 +649,7 @@ class StockApiController extends BaseApiController (new WebhookRunner())->run(GROCY_LABEL_PRINTER_WEBHOOK, $webhookData, GROCY_LABEL_PRINTER_HOOK_JSON); } - return $this->EmptyApiResponse($response); + return $this->ApiResponse($response, $webhookData); } public function RemoveProductFromShoppingList(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args) diff --git a/grocy.openapi.json b/grocy.openapi.json index becda7fb..a5ce4512 100644 --- a/grocy.openapi.json +++ b/grocy.openapi.json @@ -1547,8 +1547,16 @@ } ], "responses": { - "204": { - "description": "The operation was successful" + "200": { + "description": "The operation was successful", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "WebHook data" + } + } + } }, "400": { "description": "The operation was not successful (possible errors are: Not existing stock entry, error on WebHook execution)", @@ -2269,8 +2277,16 @@ } ], "responses": { - "204": { - "description": "The operation was successful" + "200": { + "description": "The operation was successful", + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "WebHook data" + } + } + } }, "400": { "description": "The operation was not successful (possible errors are: Not existing product, error on WebHook execution)",