@@ -23,20 +23,23 @@ export default class UserApi {
23
23
updateUsers = ( data ) => {
24
24
// customUser
25
25
26
- // const options = {}
27
- // options['customUser'] = data
28
- // return new Promise((resolve, reject) => {
29
- // this.api.putUser(data.inum, options, (error, data) => {
30
- // this.handleResponse(error, reject, resolve, data)
31
- // })
32
- // })
26
+ //CODE WITH PUT
33
27
const options = { }
34
- options [ 'userPatchRequest ' ] = data
28
+ options [ 'customUser ' ] = data
35
29
return new Promise ( ( resolve , reject ) => {
36
- this . api . patchUserByInum ( data . inum , options , ( error , data ) => {
30
+ this . api . putUser ( data . inum , options , ( error , data ) => {
37
31
this . handleResponse ( error , reject , resolve , data )
38
32
} )
39
33
} )
34
+
35
+ //Code with PATCH
36
+ // const options = {}
37
+ // options['userPatchRequest'] = data
38
+ // return new Promise((resolve, reject) => {
39
+ // this.api.patchUserByInum(data.inum, options, (error, data) => {
40
+ // this.handleResponse(error, reject, resolve, data)
41
+ // })
42
+ // })
40
43
}
41
44
deleteUser = ( inum ) => {
42
45
return new Promise ( ( resolve , reject ) => {
0 commit comments