use save
This commit is contained in:
parent
821a79ff28
commit
1af1bc87bd
|
@ -558,12 +558,11 @@ export class ApPersonService implements OnModuleInit {
|
||||||
(person.additionalPublicKeys ?? []).forEach(key => publicKeys.set(key.id, key));
|
(person.additionalPublicKeys ?? []).forEach(key => publicKeys.set(key.id, key));
|
||||||
publicKeys.set(person.publicKey.id, person.publicKey);
|
publicKeys.set(person.publicKey.id, person.publicKey);
|
||||||
|
|
||||||
for (const key of publicKeys.values()) {
|
await this.userPublickeysRepository.save(Array.from(publicKeys.values(), key => ({
|
||||||
await this.userPublickeysRepository.update({ keyId: key.id }, {
|
keyId: key.id,
|
||||||
userId: exist.id,
|
userId: exist.id,
|
||||||
keyPem: key.publicKeyPem,
|
keyPem: key.publicKeyPem,
|
||||||
});
|
})));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.userPublickeysRepository.delete({
|
this.userPublickeysRepository.delete({
|
||||||
|
|
Loading…
Reference in a new issue