Rename endpoint network/whois to net/whois

This commit is contained in:
Skylar Ittner 2021-05-16 16:53:53 -06:00
parent 0ed63d18bb
commit 4551d6a37b
2 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@ $APIS = [
"nocache (optional)" => ""
]
],
"network/whois" => [
"net/whois" => [
"load" => "network.whois.php",
"vars" => [
"domain" => "/\b((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}\b/",

View File

@ -16,7 +16,7 @@ use Iodev\Whois\Loaders\MemcachedLoader;
$json = [];
$domain = $VARS["domain"];
if (empty($VARS["nocache"])) {
$cacheresp = $memcache->get("network.whois.$domain");
$cacheresp = $memcache->get("net.whois.$domain");
if ($cacheresp !== false) {
exitWithJson(json_decode($cacheresp, true));
}
@ -49,7 +49,7 @@ try {
];
}
$json["status"] = "OK";
$memcache->set("network.whois.$domain", json_encode($json), 60 * 60 * 4);
$memcache->set("net.whois.$domain", json_encode($json), 60 * 60 * 4);
exitWithJson($json);
} catch (ConnectionException $e) {
sendJsonResp("Disconnect or connection timeout", "ERROR");