env update
This commit is contained in:
@@ -8,4 +8,6 @@ REACT_APP_APPSITE=" https://myfitapp.mermsemr.com"
|
||||
|
||||
|
||||
REACT_APP_AUX_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfit"
|
||||
REACT_APP_USERS_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
|
||||
REACT_APP_USERS_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
|
||||
|
||||
REACT_APP_SESSION_EXPIRE_MINUTES = 5
|
||||
@@ -20,18 +20,19 @@ export default function Login() {
|
||||
};
|
||||
|
||||
// email
|
||||
const [email, setMail] = useState("support@mermsemr.com");
|
||||
const [email, setMail] = useState("");
|
||||
const handleEmail = (e) => {
|
||||
setMail(e.target.value);
|
||||
};
|
||||
// password
|
||||
const [password, setPassword] = useState("123456");
|
||||
const [password, setPassword] = useState("");
|
||||
const handlePassword = (e) => {
|
||||
setPassword(e.target.value);
|
||||
};
|
||||
const navigate = useNavigate();
|
||||
const userApi = new usersService();
|
||||
const doLogin = async () => {
|
||||
// userApi.getUserReminders(); test
|
||||
if (email !== "" && password !== "") {
|
||||
var postData = {
|
||||
username: email,
|
||||
|
||||
@@ -14,12 +14,16 @@ class usersService {
|
||||
return this.postAuxEnd("/login", reqData);
|
||||
}
|
||||
|
||||
getUserReminders(){
|
||||
return this.getAuxEnd("/reminders", null);
|
||||
}
|
||||
//---------------------------------------- -----
|
||||
//---------------------------------------- -----
|
||||
// Unified call below
|
||||
//---------------------------------------- -----
|
||||
//---------------------------------------- -----
|
||||
getAuxEnd(uri, reqData) {
|
||||
debugger;
|
||||
const endPoint = process.env.REACT_APP_USERS_ENDPOINT + uri;
|
||||
return Axios.get(endPoint)
|
||||
.then((response) => {
|
||||
|
||||
Reference in New Issue
Block a user