|
|
@ -68,7 +68,7 @@ func HandleAccountRegister(w http.ResponseWriter, r *http.Request) {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if isValidUsername(request.Username) {
|
|
|
|
if !isValidUsername(request.Username) {
|
|
|
|
http.Error(w, "invalid username", http.StatusBadRequest)
|
|
|
|
http.Error(w, "invalid username", http.StatusBadRequest)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -116,7 +116,7 @@ func HandleAccountLogin(w http.ResponseWriter, r *http.Request) {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if isValidUsername(request.Username) {
|
|
|
|
if !isValidUsername(request.Username) {
|
|
|
|
http.Error(w, "invalid username", http.StatusBadRequest)
|
|
|
|
http.Error(w, "invalid username", http.StatusBadRequest)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|