diff options
author | 2021-09-06 23:13:22 +0200 | |
---|---|---|
committer | 2021-09-06 23:13:22 +0200 | |
commit | 569bdb8c5d7538fa0ea8a99ff2f8376f7cbfa51a (patch) | |
tree | 8d1cb94a56d60b9d726222277b7516fc59895613 /helpers/submitForm.js | |
parent | 275bd1d0a9aea90696c145cf992d522a0d6b0aa8 (diff) | |
download | my_apps-569bdb8c5d7538fa0ea8a99ff2f8376f7cbfa51a.tar.gz my_apps-569bdb8c5d7538fa0ea8a99ff2f8376f7cbfa51a.tar.bz2 my_apps-569bdb8c5d7538fa0ea8a99ff2f8376f7cbfa51a.zip |
added stadard linter
Diffstat (limited to 'helpers/submitForm.js')
-rw-r--r-- | helpers/submitForm.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/helpers/submitForm.js b/helpers/submitForm.js index 631c174..d67a7dc 100644 --- a/helpers/submitForm.js +++ b/helpers/submitForm.js @@ -5,9 +5,9 @@ const submitForm = async (e, url, mutateUser, setErrorMsg) => { const isRegister = url.includes('register') if ( - isRegister && e.currentTarget.password_confirm - && e.currentTarget.password_confirm.value - !== e.currentTarget.password.value + isRegister && e.currentTarget.password_confirm && + e.currentTarget.password_confirm.value !== + e.currentTarget.password.value ) { setErrorMsg('passwords_not_match') return @@ -19,13 +19,13 @@ const submitForm = async (e, url, mutateUser, setErrorMsg) => { email: e.currentTarget.email.value, password: e.currentTarget.password.value, ...(e.currentTarget.language - ? {language: e.currentTarget.language.value} + ? { language: e.currentTarget.language.value } : {} ), ...(e.currentTarget.theme - ? {theme: e.currentTarget.theme.value} + ? { theme: e.currentTarget.theme.value } : {} - ), + ) } try { @@ -33,7 +33,7 @@ const submitForm = async (e, url, mutateUser, setErrorMsg) => { await fetchJson(url, { method: 'POST', headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify(body), + body: JSON.stringify(body) }) ) } catch (err) { |