Fix Issues (#1923)
This commit is contained in:
parent
6876f11a36
commit
c8d4c98f8c
2 changed files with 4 additions and 2 deletions
|
@ -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 {
|
||||
|
|
|
@ -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'>
|
||||
|
|
Loading…
Reference in a new issue