env variables are strings, fix conditions
This commit is contained in:
parent
75bf6e0ec4
commit
4438d13ab4
|
@ -108,7 +108,7 @@ async function genericAccessCheck(name, url, done) {
|
||||||
|
|
||||||
const checks = [uploadCheck, websiteCheck, downloadCheck, skylinkSubdomainCheck, handshakeSubdomainCheck];
|
const checks = [uploadCheck, websiteCheck, downloadCheck, skylinkSubdomainCheck, handshakeSubdomainCheck];
|
||||||
|
|
||||||
if (process.env.ACCOUNTS_ENABLED) {
|
if (process.env.ACCOUNTS_ENABLED === "1") {
|
||||||
checks.push(accountHealthCheck, accountWebsiteCheck);
|
checks.push(accountHealthCheck, accountWebsiteCheck);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ if (!process.env.SKYNET_PORTAL_API) {
|
||||||
throw new Error("You need to provide SKYNET_PORTAL_API environment variable");
|
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");
|
throw new Error("You need to provide SKYNET_DASHBOARD_URL environment variable when accounts are enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue