Remove unneeded methods.
This commit is contained in:
parent
6371ee57e5
commit
4177ed74d6
|
@ -16,16 +16,6 @@ require("yargs/yargs")(process.argv.slice(2))
|
||||||
console.log(await getAuthCookie(true));
|
console.log(await getAuthCookie(true));
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.command(
|
|
||||||
"apikey",
|
|
||||||
"Get test user's API key",
|
|
||||||
() => {},
|
|
||||||
async () => {
|
|
||||||
const { getAPIKey } = require("../src/utils");
|
|
||||||
|
|
||||||
console.log(await getAPIKey());
|
|
||||||
}
|
|
||||||
)
|
|
||||||
.command(
|
.command(
|
||||||
"enable",
|
"enable",
|
||||||
"Mark portal as enabled",
|
"Mark portal as enabled",
|
||||||
|
|
|
@ -61,19 +61,6 @@ function getRequiredEnvironmentVariable(name) {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Fetches test user's API key from the environment. Raises an error if that
|
|
||||||
* is not possible.
|
|
||||||
* @returns {string} API key
|
|
||||||
*/
|
|
||||||
function getAPIKey() {
|
|
||||||
const apiKey = getRequiredEnvironmentVariable("ACCOUNTS_TEST_USER_API_KEY");
|
|
||||||
if (!apiKey) {
|
|
||||||
throw new Error("Missing or empty environment variable ACCOUNTS_TEST_USER_API_KEY.");
|
|
||||||
}
|
|
||||||
return apiKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Authenticate with given credentials and return auth cookie
|
* Authenticate with given credentials and return auth cookie
|
||||||
* Creates new account if username does not exist
|
* Creates new account if username does not exist
|
||||||
|
|
Reference in New Issue