Fixed client side webhook runner (references #1500)

This commit is contained in:
Bernd Bestel 2021-06-13 08:40:16 +02:00
parent 26979a4321
commit fe59fac1c3
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 22 additions and 6 deletions

View File

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

View File

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