env variables are strings, fix conditions

This commit is contained in:
Karol Wypchlo 2021-05-31 09:58:58 +02:00
parent 75bf6e0ec4
commit 4438d13ab4
2 changed files with 2 additions and 2 deletions

View File

@ -108,7 +108,7 @@ async function genericAccessCheck(name, url, done) {
const checks = [uploadCheck, websiteCheck, downloadCheck, skylinkSubdomainCheck, handshakeSubdomainCheck];
if (process.env.ACCOUNTS_ENABLED) {
if (process.env.ACCOUNTS_ENABLED === "1") {
checks.push(accountHealthCheck, accountWebsiteCheck);
}

View File

@ -4,7 +4,7 @@ if (!process.env.SKYNET_PORTAL_API) {
throw new Error("You need to provide SKYNET_PORTAL_API environment variable");
}
if (process.env.ACCOUNTS_ENABLED && !process.env.SKYNET_DASHBOARD_URL) {
if (process.env.ACCOUNTS_ENABLED === "1" && !process.env.SKYNET_DASHBOARD_URL) {
throw new Error("You need to provide SKYNET_DASHBOARD_URL environment variable when accounts are enabled");
}