This commit is contained in:
lingdocs 2021-08-22 14:43:09 +04:00
parent 717e0930b2
commit 69a0a15f2d
3 changed files with 1 additions and 2 deletions

View File

@ -107,6 +107,7 @@ export async function createWordlistDatabase(uuid: T.UUID): Promise<{ name: T.Wo
const password = generateWordlistDbPassword();
const name = getWordlistDbName(uuid);
// create wordlist database for user
console.log("creating db for", uuid);
await nano.db.create(name);
const securityInfo = {
admins: {

View File

@ -96,7 +96,6 @@ apiRouter.put("/user/upgrade", async (req, res, next) => {
try {
const givenPassword = (req.body.password || "") as string;
const studentPassword = env.upgradePassword;
console.log("comparing", givenPassword.toLocaleLowerCase().trim(), "to", studentPassword.toLowerCase());
if (givenPassword.toLowerCase().trim() !== studentPassword.toLowerCase()) {
const wrongPass: T.UpgradeUserResponse = {
ok: false,

View File

@ -31,7 +31,6 @@ export async function publishDictionary(): Promise<FT.PublishDictionaryResponse>
}
export async function upgradeAccount(password: string): Promise<AT.UpgradeUserResponse> {
const response = await accountApiFetch("user/upgrade", "PUT", { password });
return response as AT.UpgradeUserResponse;
}