diff options
author | Ashutosh Bishnoi <41992346+mail2bishnoi@users.noreply.github.com> | 2021-07-22 11:17:22 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-22 11:17:22 +0530 |
commit | bdb3d3714d746d10b56b6db1f35dcf9cdaf4c844 (patch) | |
tree | d011e72f9609444f71eced195a6394c1d481e80b /modern/src/components/registration | |
parent | 4a6ed2462ed5ed2960fc8245ac3c5bae967e685b (diff) | |
parent | b0c4891c4b2687e7a08f05e779c84847a0f4f46c (diff) | |
download | etbsa-traccar-web-bdb3d3714d746d10b56b6db1f35dcf9cdaf4c844.tar.gz etbsa-traccar-web-bdb3d3714d746d10b56b6db1f35dcf9cdaf4c844.tar.bz2 etbsa-traccar-web-bdb3d3714d746d10b56b6db1f35dcf9cdaf4c844.zip |
Merge pull request #1 from dkyeremeh/device_list
Thank you. Merged.
Diffstat (limited to 'modern/src/components/registration')
-rw-r--r-- | modern/src/components/registration/LoginForm.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modern/src/components/registration/LoginForm.js b/modern/src/components/registration/LoginForm.js index e083541..e6da05e 100644 --- a/modern/src/components/registration/LoginForm.js +++ b/modern/src/components/registration/LoginForm.js @@ -41,7 +41,10 @@ const LoginForm = () => { const handleLogin = async (event) => { event.preventDefault(); - const response = await fetch('/api/session', { method: 'POST', body: new URLSearchParams(`email=${email}&password=${password}`) }); + const response = await fetch('/api/session', { + method: 'POST', + body: new URLSearchParams(`email=${encodeURIComponent(email)}&password=${encodeURIComponent(password)}`), + }); if (response.ok) { const user = await response.json(); dispatch(sessionActions.updateUser(user)); |