Add debug logging to API
This commit is contained in:
1 parent
e3975cc157
commit
32373f5107
1 file changed
+4
@@ -66,12 +66,16 @@ class PublicCampaignsController extends BaseController
|
||||
$domain = $_GET['domain'] ?? '';
|
||||
|
||||
try {
|
||||
// Log para debug
|
||||
error_log("API called with slug: " . $slug);
|
||||
|
||||
// Por agora, sempre retornar dados de teste
|
||||
$data = $this->getRealRedirectData(1, $startDate, $endDate, $domain);
|
||||
|
||||
echo json_encode(['success' => true, 'data' => $data]);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
error_log("API error: " . $e->getMessage());
|
||||
http_response_code(500);
|
||||
echo json_encode(['success' => false, 'message' => 'Error fetching redirect data']);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user