docs/feat: Add targeting and security fields support to API and README docs

This commit is contained in:
Bartłomiej Janczak
2026-06-03 14:28:57 +02:00
parent 0349825890
commit 0d4eab2016
2 changed files with 15 additions and 0 deletions

View File

@@ -61,6 +61,11 @@ class ShortUrlApiController extends Controller
'pixel_google_id' => 'nullable|string|max:100',
'pixel_linkedin_id' => 'nullable|string|max:100',
'webhook_url' => 'nullable|url|max:2048',
'targeting_rules' => 'nullable|array',
'password' => 'nullable|string|max:255',
'show_warning_page' => 'nullable|boolean',
'track_visits' => 'nullable|boolean',
'track_browser_language' => 'nullable|boolean',
]);
$shortUrl = $this->service->create($validated);
@@ -108,6 +113,11 @@ class ShortUrlApiController extends Controller
'pixel_google_id' => $link->pixel_google_id,
'pixel_linkedin_id' => $link->pixel_linkedin_id,
'webhook_url' => $link->webhook_url,
'targeting_rules' => $link->targeting_rules,
'password' => $link->password,
'show_warning_page' => (bool) $link->show_warning_page,
'track_visits' => (bool) $link->track_visits,
'track_browser_language' => (bool) $link->track_browser_language,
'notes' => $link->notes,
'created_at' => $link->created_at->toIso8601String(),
];