Skip to content

Commit

Permalink
fix(admin-ui): code with put request
Browse files Browse the repository at this point in the history
  • Loading branch information
mjatin-dev committed Jun 20, 2022
1 parent 6bb1d59 commit 1ad701b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<div key={entry}>
{data.oxMultiValuedAttribute && (
Expand Down
21 changes: 12 additions & 9 deletions admin-ui/plugins/user-management/redux/api/UserApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 1ad701b

Please sign in to comment.