Skip to content
Snippets Groups Projects
Unverified Commit b6889e9a authored by syuilo's avatar syuilo
Browse files

Fix bug

parent dc82203e
No related branches found
No related tags found
No related merge requests found
......@@ -159,18 +159,6 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise<Us
isBot,
isCat: (person as any).isCat === true
} 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) {
// duplicate key error
if (isDuplicateKeyValueError(e)) {
......@@ -181,6 +169,13 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise<Us
throw e;
}
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment