env update

This commit is contained in:
2023-01-28 19:59:42 -05:00
parent aae99a7b50
commit e4b1ceae30
3 changed files with 10 additions and 3 deletions
+3 -1
View File
@@ -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
+3 -2
View File
@@ -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,
+4
View File
@@ -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) => {