From dff77e1744c7520c635d6820a15bfbabb8ba7656 Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Tue, 30 May 2023 20:26:12 +0600 Subject: [PATCH] Fix create account tool (#3295) --- dev/tool/src/index.ts | 4 ++-- server/account/src/index.ts | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dev/tool/src/index.ts b/dev/tool/src/index.ts index 1c7dc2320c..b0880daec0 100644 --- a/dev/tool/src/index.ts +++ b/dev/tool/src/index.ts @@ -18,7 +18,7 @@ import { ACCOUNT_DB, assignWorkspace, confirmEmail, - createAccount, + createAcc, createWorkspace, dropAccount, dropWorkspace, @@ -116,7 +116,7 @@ export function devTool ( const { mongodbUri } = prepareTools() return await withDatabase(mongodbUri, async (db) => { console.log(`creating account ${cmd.first as string} ${cmd.last as string} (${email})...`) - await createAccount(db, productId, email, cmd.password, cmd.first, cmd.last) + await createAcc(db, productId, email, cmd.password, cmd.first, cmd.last, true) }) }) diff --git a/server/account/src/index.ts b/server/account/src/index.ts index d9c72d3ba7..94c86634f1 100644 --- a/server/account/src/index.ts +++ b/server/account/src/index.ts @@ -459,7 +459,10 @@ export async function signUpJoin ( return result } -async function createAcc ( +/** + * @public + */ +export async function createAcc ( db: Db, productId: string, email: string,