chore: add pretty print for amnezia format

This commit is contained in:
Rekryt
2024-10-28 13:56:33 +03:00
parent 2e722a9ac9
commit 9909a754c1

View File

@@ -29,6 +29,9 @@ class AmneziaController extends AbstractIPListController {
}
$response = SiteFactory::normalizeArray($response, in_array($data, ['ipv4', 'ipv6', 'cidr4', 'cidr6']));
return json_encode(array_map(fn(string $item) => ['hostname' => $item, 'ip' => ''], $response));
return json_encode(
array_map(fn(string $item) => ['hostname' => $item, 'ip' => ''], $response),
JSON_PRETTY_PRINT
);
}
}