Fix Issues (#1923)

This commit is contained in:
Hossein 2021-12-08 09:07:28 -05:00 committed by GitHub
parent 6876f11a36
commit c8d4c98f8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -297,6 +297,8 @@ func (a *API) handleRegister(w http.ResponseWriter, r *http.Request) {
a.errorResponse(w, r.URL.Path, http.StatusInternalServerError, "", err)
return
}
registerData.Email = strings.TrimSpace(registerData.Email)
registerData.Username = strings.TrimSpace(registerData.Username)
// Validate token
if len(registerData.Token) > 0 {

View file

@ -56,7 +56,7 @@ const RegisterPage = React.memo(() => {
id='login-email'
placeholder={'Enter email'}
value={email}
onChange={(e) => setEmail(e.target.value)}
onChange={(e) => setEmail(e.target.value.trim())}
/>
</div>
<div className='username'>
@ -64,7 +64,7 @@ const RegisterPage = React.memo(() => {
id='login-username'
placeholder={'Enter username'}
value={username}
onChange={(e) => setUsername(e.target.value)}
onChange={(e) => setUsername(e.target.value.trim())}
/>
</div>
<div className='password'>