Skip to content

Commit c0bfe65

Browse files
package details for heroku
including npm and node version details for Heroku deployment
1 parent b5698f8 commit c0bfe65

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

package.json

+4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
"test": "react-scripts test",
3232
"eject": "react-scripts eject"
3333
},
34+
"engines": {
35+
"node": "16.15.0",
36+
"npm": "8.5.5"
37+
},
3438
"eslintConfig": {
3539
"extends": [
3640
"react-app",

src/services/admin_api.js

+15
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,21 @@ export default new (class Http {
6666
}
6767
}
6868

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+
6984
delete = async (urlpath, data) => {
7085
try {
7186
const response = await this.AxiosSetup().delete(urlpath, data)

0 commit comments

Comments
 (0)