Bring back possibility to disable 2fa for a user from the users view

This commit is contained in:
Johannes Zellner
2025-06-04 10:48:57 +02:00
parent 6332db8e86
commit d47b947acf
2 changed files with 30 additions and 0 deletions
+11
View File
@@ -168,6 +168,17 @@ function create() {
if (result.status !== 200) return [result];
return [null, result.body.inviteLink];
},
async disableTwoFactorAuthentication(id) {
let result;
try {
result = await fetcher.post(`${API_ORIGIN}/api/v1/users/${id}/twofactorauthentication_disable`, {}, { access_token: accessToken });
} catch (e) {
return [e];
}
if (result.status !== 200) return [result];
return [null];
},
};
}