X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fuser.ts;h=29d6d087d1bbde1821815a863f738f0de793d8be;hb=4707f410ae44b55e17e1758693dd21cff03b7ef1;hp=acb883e23d202668403a48dc2af039515779aa47;hpb=0b2f03d3712f438f67eccf86b67acd047284f9b4;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/user.ts b/server/lib/user.ts index acb883e23..29d6d087d 100644 --- a/server/lib/user.ts +++ b/server/lib/user.ts @@ -17,10 +17,8 @@ async function createUserAccountAndChannel (userToCreate: UserModel, validateUse validate: validateUser } - const [ userCreated, accountCreated ] = await Promise.all([ - userToCreate.save(userOptions), - createLocalAccountWithoutKeys(userToCreate.username, userToCreate.id, null, t) - ]) + const userCreated = await userToCreate.save(userOptions) + const accountCreated = await createLocalAccountWithoutKeys(userCreated.username, userCreated.id, null, t) userCreated.Account = accountCreated let channelName = userCreated.username + '_channel'