support skydb in hns
This commit is contained in:
parent
a19a1ab602
commit
84e54f3311
|
@ -85,13 +85,11 @@ const resolveDomainHandler = async (req, res) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Checks if the given string is a valid Sia link.
|
// Checks if the given string is a valid Sia link.
|
||||||
function isValidSkylink(link) {
|
function isValidSkylink(value) {
|
||||||
if (!link || link.length === 0) {
|
return Boolean(value && value.match(startsWithSkylinkRegExp));
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return Boolean(link.match(startsWithSkylinkRegExp));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Checks if given string is a valid skynet registry entry
|
||||||
function isValidRegistryEntry(value) {
|
function isValidRegistryEntry(value) {
|
||||||
return Boolean(value && value.match(registryEntryRegExp));
|
return Boolean(value && value.match(registryEntryRegExp));
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue