From e4b1ceae306c0ded6037dcc9605480231ea9ae29 Mon Sep 17 00:00:00 2001 From: "DESKTOP-BC3NEC6\\chiefsoft" Date: Sat, 28 Jan 2023 19:59:42 -0500 Subject: [PATCH] env update --- .env | 4 +++- src/components/AuthPages/Login/index.jsx | 5 +++-- src/services/UsersService.js | 4 ++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.env b/.env index dbc5184..4fcdc31 100644 --- a/.env +++ b/.env @@ -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" \ No newline at end of file +REACT_APP_USERS_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfituser" + +REACT_APP_SESSION_EXPIRE_MINUTES = 5 \ No newline at end of file diff --git a/src/components/AuthPages/Login/index.jsx b/src/components/AuthPages/Login/index.jsx index a51ce2f..2a0fc66 100644 --- a/src/components/AuthPages/Login/index.jsx +++ b/src/components/AuthPages/Login/index.jsx @@ -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, diff --git a/src/services/UsersService.js b/src/services/UsersService.js index b53a0c2..f22000b 100644 --- a/src/services/UsersService.js +++ b/src/services/UsersService.js @@ -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) => {