From 1ad701b1cbe2d783b33edb9ccacea2be88070a63 Mon Sep 17 00:00:00 2001 From: = Date: Mon, 20 Jun 2022 15:25:30 +0530 Subject: [PATCH] fix(admin-ui): code with put request --- .../UserManagement/UserClaimEntry.js | 1 - .../user-management/redux/api/UserApi.js | 21 +++++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/admin-ui/plugins/user-management/components/UserManagement/UserClaimEntry.js b/admin-ui/plugins/user-management/components/UserManagement/UserClaimEntry.js index a7f375472..85f5c2438 100644 --- a/admin-ui/plugins/user-management/components/UserManagement/UserClaimEntry.js +++ b/admin-ui/plugins/user-management/components/UserManagement/UserClaimEntry.js @@ -7,7 +7,6 @@ function UserClaimEntry({ data, type, entry, formik, handler }) { const doHandle = () => { handler(data.name) } - console.log(data.name, formik.values[data.name]) return (
{data.oxMultiValuedAttribute && ( diff --git a/admin-ui/plugins/user-management/redux/api/UserApi.js b/admin-ui/plugins/user-management/redux/api/UserApi.js index ab631f9c4..e28410401 100644 --- a/admin-ui/plugins/user-management/redux/api/UserApi.js +++ b/admin-ui/plugins/user-management/redux/api/UserApi.js @@ -23,20 +23,23 @@ export default class UserApi { updateUsers = (data) => { // customUser - // const options = {} - // options['customUser'] = data - // return new Promise((resolve, reject) => { - // this.api.putUser(data.inum, options, (error, data) => { - // this.handleResponse(error, reject, resolve, data) - // }) - // }) + //CODE WITH PUT const options = {} - options['userPatchRequest'] = data + options['customUser'] = data return new Promise((resolve, reject) => { - this.api.patchUserByInum(data.inum, options, (error, data) => { + this.api.putUser(data.inum, options, (error, data) => { this.handleResponse(error, reject, resolve, data) }) }) + + //Code with PATCH + // const options = {} + // options['userPatchRequest'] = data + // return new Promise((resolve, reject) => { + // this.api.patchUserByInum(data.inum, options, (error, data) => { + // this.handleResponse(error, reject, resolve, data) + // }) + // }) } deleteUser = (inum) => { return new Promise((resolve, reject) => {