Fix create account tool (#3295)

This commit is contained in:
Denis Bykhov
2023-05-30 21:26:12 +07:00
committed by GitHub
parent f403d44769
commit dff77e1744
2 changed files with 6 additions and 3 deletions
+2 -2
View File
@@ -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)
})
})
+4 -1
View File
@@ -459,7 +459,10 @@ export async function signUpJoin (
return result
}
async function createAcc (
/**
* @public
*/
export async function createAcc (
db: Db,
productId: string,
email: string,