Adds no files to register error

This commit is contained in:
Akshay Nair
2020-10-05 15:10:13 +05:30
parent 8b795762ee
commit 37f9820048
+3
View File
@@ -20,6 +20,9 @@ const toHostList = R.chain(data => {
const registerDomains = async ({ domainService, getDomains }) => {
const domains = await getDomains().then(toHostList);
if (domains.length === 0)
return Promise.reject(new Error('Nothing to register'));
return domainService.updateHosts(domains);
};