update call
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user