ui: use Async tools from widget toolkit
The api2 one passes the whole response (for more flexibility) on reject, so we need to adapt to that. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -161,14 +161,14 @@ Ext.define('PBS.config.TfaView', {
|
||||
|
||||
try {
|
||||
me.getView().mask(gettext('Please wait...'), 'x-mask-loading');
|
||||
await PBS.Async.api2({
|
||||
await Proxmox.Async.api2({
|
||||
url: `/api2/extjs/access/tfa/${record.id}`,
|
||||
method: 'DELETE',
|
||||
params,
|
||||
});
|
||||
me.reload();
|
||||
} catch (error) {
|
||||
Ext.Msg.alert(gettext('Error'), error);
|
||||
} catch (response) {
|
||||
Ext.Msg.alert(gettext('Error'), response.result.message);
|
||||
} finally {
|
||||
me.getView().unmask();
|
||||
}
|
||||
|
Reference in New Issue
Block a user