From 6419819d9fdf437b2c4eef1427af1282f5b02060 Mon Sep 17 00:00:00 2001 From: Thomas Zemp Date: Tue, 10 Oct 2023 09:13:00 +0200 Subject: [PATCH] fix: update api for 2fa disable [DHIS2-15866] (#1307) --- src/pages/UserList/ContextMenu/Modals/Disable2FaModal.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pages/UserList/ContextMenu/Modals/Disable2FaModal.js b/src/pages/UserList/ContextMenu/Modals/Disable2FaModal.js index 28764df00..3fa60f9e8 100644 --- a/src/pages/UserList/ContextMenu/Modals/Disable2FaModal.js +++ b/src/pages/UserList/ContextMenu/Modals/Disable2FaModal.js @@ -21,10 +21,8 @@ const Disable2FaModal = ({ user, refetchUsers, onClose }) => { setLoading(true) try { await engine.mutate({ - resource: `users/${user.id}`, - type: 'update', - partial: true, - data: { userCredentials: { twoFA: false } }, + resource: `users/${user.id}/twoFA/disabled`, + type: 'create', }) const message = i18n.t( 'Disabled two factor authentication for "{{- name}}" successfuly',