Rework the 2fa disable dialog

This commit is contained in:
Johannes Zellner
2025-06-11 10:47:47 +02:00
parent 53b83909ed
commit 1ddba4a76f
3 changed files with 92 additions and 19 deletions
+3 -3
View File
@@ -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) {