Skip to content

Commit bfb04d3

Browse files
authored
Now compressing the data sent to SQS
1 parent 65267a9 commit bfb04d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ShopifyApp/Traits/WebhookController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Osiset\ShopifyApp\Traits;
44

5+
use App\Jobs\AbstractShopifyWebhookJob;
56
use Illuminate\Http\Request;
67
use Illuminate\Http\Response as ResponseResponse;
78
use Illuminate\Support\Facades\Response;
@@ -24,11 +25,10 @@ public function handle(string $type, Request $request): ResponseResponse
2425
{
2526
// Get the job class and dispatch
2627
$jobClass = getShopifyConfig('job_namespace').str_replace('-', '', ucwords($type, '-')).'Job';
27-
$jobData = json_decode($request->getContent());
2828

2929
$jobClass::dispatch(
3030
$request->header('x-shopify-shop-domain'),
31-
$jobData
31+
AbstractShopifyWebhookJob::compressPayload($request->getContent())
3232
)->onQueue(getShopifyConfig('job_queues')['webhooks']);
3333

3434
return Response::make('', 201);

0 commit comments

Comments
 (0)