File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 31
31
"test" : " react-scripts test" ,
32
32
"eject" : " react-scripts eject"
33
33
},
34
+ "engines" : {
35
+ "node" : " 16.15.0" ,
36
+ "npm" : " 8.5.5"
37
+ },
34
38
"eslintConfig" : {
35
39
"extends" : [
36
40
" react-app" ,
Original file line number Diff line number Diff line change @@ -66,6 +66,21 @@ export default new (class Http {
66
66
}
67
67
}
68
68
69
+ patch = async ( urlpath , data , config ) => {
70
+ try {
71
+ const response = await this . AxiosSetup ( ) . patch ( urlpath , data , config )
72
+ if (
73
+ response . data . errorMsg !== null
74
+ ) {
75
+ localStorage . removeItem ( "jwt_token" )
76
+ // window.location.reload()
77
+ }
78
+ return response
79
+ } catch ( err ) {
80
+ return err
81
+ }
82
+ }
83
+
69
84
delete = async ( urlpath , data ) => {
70
85
try {
71
86
const response = await this . AxiosSetup ( ) . delete ( urlpath , data )
You can’t perform that action at this time.
0 commit comments