This commit is contained in:
Olu Amey
2023-01-26 20:54:23 -05:00
parent 623d3be042
commit fc2b067f52
3 changed files with 14 additions and 4 deletions
+9
View File
@@ -4489,6 +4489,15 @@
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
},
"cors": {
"version": "2.8.5",
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
"requires": {
"object-assign": "^4",
"vary": "^1"
}
},
"cosmiconfig": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz",
+1
View File
@@ -11,6 +11,7 @@
"axios": "^0.24.0",
"chart.js": "^3.7.1",
"chartjs": "^0.3.24",
"cors": "^2.8.5",
"faker": "^6.6.6",
"react": "^18.0.0",
"react-chartjs-2": "^4.1.0",
+4 -4
View File
@@ -7,7 +7,7 @@ class usersService {
}
logInUser(reqData) {
debugger;
// debugger;
/*
clean up the request data here
*/
@@ -58,9 +58,9 @@ class usersService {
email: "test@test.com",
password: "password"
};
Axios.defaults.headers.post['Content-Type'] ='application/json;charset=utf-8';
Axios.defaults.headers.post['Access-Control-Allow-Origin'] = '*';
return Axios.post(endPoint, postData,axiosConfig)
// Axios.defaults.headers.post['Content-Type'] ='application/json;charset=utf-8';
// Axios.defaults.headers.post['Access-Control-Allow-Origin'] = '*'; //,axiosConfig
return Axios.post(endPoint, postData)
.then((response) => {
console.log(response);
// res = response;