Fix create account tool (#3295)

This commit is contained in:
Denis Bykhov 2023-05-30 20:26:12 +06:00 committed by GitHub
parent f403d44769
commit dff77e1744
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

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)
})
})

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,