We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b5698f8 commit c0bfe65Copy full SHA for c0bfe65
package.json
@@ -31,6 +31,10 @@
31
"test": "react-scripts test",
32
"eject": "react-scripts eject"
33
},
34
+ "engines": {
35
+ "node": "16.15.0",
36
+ "npm": "8.5.5"
37
+ },
38
"eslintConfig": {
39
"extends": [
40
"react-app",
src/services/admin_api.js
@@ -66,6 +66,21 @@ export default new (class Http {
66
}
67
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
+
84
delete = async (urlpath, data) => {
85
try {
86
const response = await this.AxiosSetup().delete(urlpath, data)
0 commit comments