Remove unneeded methods.

This commit is contained in:
Ivaylo Novakov 2022-02-15 15:22:36 +01:00
parent 6371ee57e5
commit 4177ed74d6
No known key found for this signature in database
GPG Key ID: 06B9354AB08BE9C6
2 changed files with 0 additions and 23 deletions

View File

@ -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",

View File

@ -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