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_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
|
// email
|
||||||
const [email, setMail] = useState("support@mermsemr.com");
|
const [email, setMail] = useState("");
|
||||||
const handleEmail = (e) => {
|
const handleEmail = (e) => {
|
||||||
setMail(e.target.value);
|
setMail(e.target.value);
|
||||||
};
|
};
|
||||||
// password
|
// password
|
||||||
const [password, setPassword] = useState("123456");
|
const [password, setPassword] = useState("");
|
||||||
const handlePassword = (e) => {
|
const handlePassword = (e) => {
|
||||||
setPassword(e.target.value);
|
setPassword(e.target.value);
|
||||||
};
|
};
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const userApi = new usersService();
|
const userApi = new usersService();
|
||||||
const doLogin = async () => {
|
const doLogin = async () => {
|
||||||
|
// userApi.getUserReminders(); test
|
||||||
if (email !== "" && password !== "") {
|
if (email !== "" && password !== "") {
|
||||||
var postData = {
|
var postData = {
|
||||||
username: email,
|
username: email,
|
||||||
|
|||||||
@@ -14,12 +14,16 @@ class usersService {
|
|||||||
return this.postAuxEnd("/login", reqData);
|
return this.postAuxEnd("/login", reqData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getUserReminders(){
|
||||||
|
return this.getAuxEnd("/reminders", null);
|
||||||
|
}
|
||||||
//---------------------------------------- -----
|
//---------------------------------------- -----
|
||||||
//---------------------------------------- -----
|
//---------------------------------------- -----
|
||||||
// Unified call below
|
// Unified call below
|
||||||
//---------------------------------------- -----
|
//---------------------------------------- -----
|
||||||
//---------------------------------------- -----
|
//---------------------------------------- -----
|
||||||
getAuxEnd(uri, reqData) {
|
getAuxEnd(uri, reqData) {
|
||||||
|
debugger;
|
||||||
const endPoint = process.env.REACT_APP_USERS_ENDPOINT + uri;
|
const endPoint = process.env.REACT_APP_USERS_ENDPOINT + uri;
|
||||||
return Axios.get(endPoint)
|
return Axios.get(endPoint)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user