Update
This commit is contained in:
@@ -24,7 +24,10 @@ public function shot(Request $request): JsonResponse
|
||||
'delay' => 'integer|min:0|max:30000',
|
||||
'block_ads' => 'boolean',
|
||||
'block_cookie_banners' => 'boolean',
|
||||
'block_trackers' => 'boolean'
|
||||
'block_trackers' => 'boolean',
|
||||
'webhook_url' => 'nullable|url|max:2048',
|
||||
'webhook_events_filter' => 'nullable|array',
|
||||
'webhook_events_filter.*' => 'in:queued,processing,completed,failed'
|
||||
]);
|
||||
|
||||
$uuid = Str::uuid()->toString();
|
||||
@@ -34,6 +37,8 @@ public function shot(Request $request): JsonResponse
|
||||
'type' => 'shot',
|
||||
'url' => $validated['url'],
|
||||
'status' => 'queued',
|
||||
'webhook_url' => $validated['webhook_url'] ?? null,
|
||||
'webhook_events_filter' => isset($validated['webhook_events_filter']) ? $validated['webhook_events_filter'] : ['queued', 'processing', 'completed', 'failed'],
|
||||
'parameters' => array_filter([
|
||||
'viewport_width' => $validated['viewport_width'] ?? 1920,
|
||||
'viewport_height' => $validated['viewport_height'] ?? 1080,
|
||||
|
||||
Reference in New Issue
Block a user