|
|
|
@ -60,7 +60,8 @@ func registration(s *AuthServer) http.HandlerFunc { |
|
|
|
|
return func(w http.ResponseWriter, r *http.Request) { |
|
|
|
|
uid := r.FormValue("uid") |
|
|
|
|
email := r.FormValue("email") |
|
|
|
|
code, err := s.db.Registration(uid, email) |
|
|
|
|
password := r.FormValue("password") |
|
|
|
|
_, err := s.db.Registration(uid, email, password) |
|
|
|
|
if err != nil { |
|
|
|
|
status := status.Convert(err) |
|
|
|
|
w.Write([]byte(status.Message())) |
|
|
|
@ -68,7 +69,7 @@ func registration(s *AuthServer) http.HandlerFunc { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
w.Write([]byte(fmt.Sprintf("Success registration for %s with code %s", uid, code))) |
|
|
|
|
w.Write([]byte(fmt.Sprintf("Success registration for %s", uid))) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|