update call

This commit is contained in:
2023-01-26 22:32:45 -05:00
parent fc2b067f52
commit aa61c8cd26
2 changed files with 8 additions and 3 deletions
+7 -2
View File
@@ -33,8 +33,13 @@ export default function Login() {
const userApi = new usersService();
const doLogin = () => {
if (email !== "" && password !== "") {
userApi.logInUser("support@mermsemr.com"); // just for a test
if (email === "support@mermsemr.com") {
var postData = {
username: email,
password: password
};
const loginResult = userApi.logInUser(postData); // just for a test
// if (email === "support@mermsemr.com") {
if (loginResult.data.status > 0 ) { // just for a start
localStorage.setItem("email", `${email}`);
setLoginLoading(true);
setTimeout(() => {
+1 -1
View File
@@ -60,7 +60,7 @@ class usersService {
};
// 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)
return Axios.post(endPoint, reqData)
.then((response) => {
console.log(response);
// res = response;