This commit is contained in:
@@ -19,6 +19,12 @@ if ($method === 'GET') {
|
||||
$result = mysqli_stmt_get_result($stmt);
|
||||
$domains = [];
|
||||
while ($row = mysqli_fetch_assoc($result)) {
|
||||
$domain = normalize_redirect_host($row['domain'] ?? '');
|
||||
if ($domain === null) {
|
||||
continue;
|
||||
}
|
||||
$row['domain'] = $domain;
|
||||
$row['id'] = (int) $row['id'];
|
||||
$domains[] = $row;
|
||||
}
|
||||
mysqli_stmt_close($stmt);
|
||||
@@ -45,4 +51,4 @@ if ($method === 'GET') {
|
||||
} else {
|
||||
echo json_encode(['success' => false, 'message' => 'Invalid request method.'], 405);
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user