web/admin: fix list of webauthn devices not updating after rename

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-09-01 18:58:59 +02:00
parent 3a58dc62e1
commit 7d26ea1a9c
1 changed files with 8 additions and 4 deletions

View File

@ -51,10 +51,14 @@ export class UserSettingsAuthenticatorWebAuthn extends BaseUserSettings {
slot="form" slot="form"
successMessage=${t`Successfully updated device.`} successMessage=${t`Successfully updated device.`}
.send=${(data: unknown) => { .send=${(data: unknown) => {
return new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsWebauthnUpdate({ return new AuthenticatorsApi(DEFAULT_CONFIG)
id: device.pk || 0, .authenticatorsWebauthnUpdate({
webAuthnDeviceRequest: data as WebAuthnDevice, id: device.pk || 0,
}); webAuthnDeviceRequest: data as WebAuthnDevice,
})
.then(() => {
this.requestUpdate();
});
}} }}
> >
<form class="pf-c-form pf-m-horizontal"> <form class="pf-c-form pf-m-horizontal">