Merge pull request #820 from SkynetLabs/env-variables-are-strings

env variables are strings, fix conditions
This commit is contained in:
Karol Wypchło 2021-05-31 10:24:32 +02:00 committed by GitHub
commit 9f29e3d544
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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");
}