Api call
This commit is contained in:
Generated
+9
@@ -4489,6 +4489,15 @@
|
|||||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
|
||||||
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
|
"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": {
|
"cosmiconfig": {
|
||||||
"version": "7.1.0",
|
"version": "7.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz",
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
"axios": "^0.24.0",
|
"axios": "^0.24.0",
|
||||||
"chart.js": "^3.7.1",
|
"chart.js": "^3.7.1",
|
||||||
"chartjs": "^0.3.24",
|
"chartjs": "^0.3.24",
|
||||||
|
"cors": "^2.8.5",
|
||||||
"faker": "^6.6.6",
|
"faker": "^6.6.6",
|
||||||
"react": "^18.0.0",
|
"react": "^18.0.0",
|
||||||
"react-chartjs-2": "^4.1.0",
|
"react-chartjs-2": "^4.1.0",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class usersService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
logInUser(reqData) {
|
logInUser(reqData) {
|
||||||
debugger;
|
// debugger;
|
||||||
/*
|
/*
|
||||||
clean up the request data here
|
clean up the request data here
|
||||||
*/
|
*/
|
||||||
@@ -58,9 +58,9 @@ class usersService {
|
|||||||
email: "test@test.com",
|
email: "test@test.com",
|
||||||
password: "password"
|
password: "password"
|
||||||
};
|
};
|
||||||
Axios.defaults.headers.post['Content-Type'] ='application/json;charset=utf-8';
|
// Axios.defaults.headers.post['Content-Type'] ='application/json;charset=utf-8';
|
||||||
Axios.defaults.headers.post['Access-Control-Allow-Origin'] = '*';
|
// Axios.defaults.headers.post['Access-Control-Allow-Origin'] = '*'; //,axiosConfig
|
||||||
return Axios.post(endPoint, postData,axiosConfig)
|
return Axios.post(endPoint, postData)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log(response);
|
console.log(response);
|
||||||
// res = response;
|
// res = response;
|
||||||
|
|||||||
Reference in New Issue
Block a user