aboutsummaryrefslogtreecommitdiff
path: root/modern/src/components/registration
diff options
context:
space:
mode:
authorAshutosh Bishnoi <41992346+mail2bishnoi@users.noreply.github.com>2021-07-22 11:17:22 +0530
committerGitHub <noreply@github.com>2021-07-22 11:17:22 +0530
commitbdb3d3714d746d10b56b6db1f35dcf9cdaf4c844 (patch)
treed011e72f9609444f71eced195a6394c1d481e80b /modern/src/components/registration
parent4a6ed2462ed5ed2960fc8245ac3c5bae967e685b (diff)
parentb0c4891c4b2687e7a08f05e779c84847a0f4f46c (diff)
downloadetbsa-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.js5
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));