Fix bug
This commit is contained in:
parent
dc82203e9b
commit
b6889e9ac6
1 changed files with 7 additions and 12 deletions
|
@ -159,18 +159,6 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise<Us
|
||||||
isBot,
|
isBot,
|
||||||
isCat: (person as any).isCat === true
|
isCat: (person as any).isCat === true
|
||||||
} as Partial<User>) as IRemoteUser;
|
} as Partial<User>) as IRemoteUser;
|
||||||
|
|
||||||
await UserPublickeys.save({
|
|
||||||
id: genId(),
|
|
||||||
userId: user.id,
|
|
||||||
keyId: person.publicKey.id,
|
|
||||||
keyPem: person.publicKey.publicKeyPem
|
|
||||||
} as UserPublickey);
|
|
||||||
|
|
||||||
await UserServiceLinkings.save({
|
|
||||||
id: genId(),
|
|
||||||
userId: user.id,
|
|
||||||
} as UserServiceLinking);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// duplicate key error
|
// duplicate key error
|
||||||
if (isDuplicateKeyValueError(e)) {
|
if (isDuplicateKeyValueError(e)) {
|
||||||
|
@ -181,6 +169,13 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise<Us
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await UserPublickeys.save({
|
||||||
|
id: genId(),
|
||||||
|
userId: user.id,
|
||||||
|
keyId: person.publicKey.id,
|
||||||
|
keyPem: person.publicKey.publicKeyPem
|
||||||
|
} as UserPublickey);
|
||||||
|
|
||||||
await UserServiceLinkings.save({
|
await UserServiceLinkings.save({
|
||||||
id: genId(),
|
id: genId(),
|
||||||
userId: user.id
|
userId: user.id
|
||||||
|
|
Loading…
Reference in a new issue