Fix channel creation post actor conversion
This commit is contained in:
parent
c7b2be318f
commit
f6f06dc98d
1 changed files with 4 additions and 3 deletions
|
@ -54,17 +54,18 @@ export default define(meta, paramDef, async (ps, user) => {
|
|||
}
|
||||
}
|
||||
|
||||
const keyPair = genRsaKeyPair(4096);
|
||||
const keyPair = await genRsaKeyPair(4096);
|
||||
|
||||
let channel;
|
||||
await db.transaction(async transactionalEntityManager => {
|
||||
const channel = await transactionalEntityManager.insert(Channel, {
|
||||
channel = await transactionalEntityManager.insert(Channel, {
|
||||
id: genId(),
|
||||
createdAt: new Date(),
|
||||
userId: user.id,
|
||||
name: ps.name,
|
||||
description: ps.description || null,
|
||||
bannerId: banner ? banner.id : null,
|
||||
}).then(x => Channels.findOneByOrFail(x.identifiers[0]));
|
||||
}).then(x => transactionalEntityManager.findOneByOrFail(Channel, x.identifiers[0]));
|
||||
|
||||
await transactionalEntityManager.insert(ChannelKeypair, {
|
||||
publicKey: keyPair.publicKey,
|
||||
|
|
Loading…
Add table
Reference in a new issue