support skydb in hns

This commit is contained in:
Karol Wypchlo 2020-11-03 16:30:34 +01:00
parent a19a1ab602
commit 84e54f3311
1 changed files with 3 additions and 5 deletions

View File

@ -85,13 +85,11 @@ const resolveDomainHandler = async (req, res) => {
};
// Checks if the given string is a valid Sia link.
function isValidSkylink(link) {
if (!link || link.length === 0) {
return false;
}
return Boolean(link.match(startsWithSkylinkRegExp));
function isValidSkylink(value) {
return Boolean(value && value.match(startsWithSkylinkRegExp));
}
// Checks if given string is a valid skynet registry entry
function isValidRegistryEntry(value) {
return Boolean(value && value.match(registryEntryRegExp));
}