Rework the 2fa disable dialog
This commit is contained in:
@@ -194,14 +194,14 @@ function create() {
|
||||
return [null];
|
||||
},
|
||||
async disableTwoFA(password) {
|
||||
let error, result;
|
||||
let result;
|
||||
try {
|
||||
result = await fetcher.post(`${API_ORIGIN}/api/v1/profile/twofactorauthentication_disable`, { password }, { access_token: accessToken });
|
||||
} catch (e) {
|
||||
error = e;
|
||||
return [e];
|
||||
}
|
||||
|
||||
if (error || result.status !== 204) return [error || result];
|
||||
if (result.status !== 204) return [result];
|
||||
return [null];
|
||||
},
|
||||
async setNotificationConfig(notificationConfig) {
|
||||
|
||||
Reference in New Issue
Block a user