From ed3f6ffc8646abc67dccee80135dd19f1f60c6cc Mon Sep 17 00:00:00 2001 From: Thomas Zemp Date: Tue, 10 Oct 2023 09:12:49 +0200 Subject: [PATCH] fix: update api for 2fa disable [DHIS2-15866] (#1315) --- 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 b02a9a70b..7086b5ebd 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',