fix registration

This commit is contained in:
_Bastler 2022-11-24 12:41:04 +01:00
parent 88bd69cbc6
commit 7391ff1147

View File

@ -107,14 +107,14 @@ export class RegisterComponent implements OnInit {
if (this.form.valid && !this.working) {
this.working = true;
let pgpOption = {
userIds: [ { name: this.model.username, email: this.model.username + "@we.bstly.de" } ],
userIDs: [{ name: this.model.username, email: this.model.username + "@we.bstly.de" }],
curve: "ed25519",
}
var pubKey, privKey
openpgp.generateKey(pgpOption).then((key) => {
privKey = key.privateKeyArmored;
pubKey = key.publicKeyArmored;
privKey = key.privateKey;
pubKey = key.publicKey;
this.model.profileFields = [
{ "name": "publicKey", "type": "BLOB", "visibility": "PROTECTED", "blob": pubKey }
@ -159,6 +159,7 @@ export class RegisterComponent implements OnInit {
}
for (let code in errors) {
console.warn(code, errors[code]);
this.form.get(code).setErrors(errors[code]);
}
}