From f66f16f04689cbfc8e0c0aea4bbee1d1f56cdd42 Mon Sep 17 00:00:00 2001 From: Thomas Zemp Date: Fri, 29 Sep 2023 10:15:33 +0200 Subject: [PATCH] fix: update api for 2fa disable [DHIS2-15866] --- 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',