mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
fix creation check
This commit is contained in:
@@ -60,8 +60,9 @@ func (s *User) Create(ctx context.Context, req *pb.CreateRequest, rsp *pb.Create
|
||||
return errors.BadRequest("create.username-check", "username already exists")
|
||||
}
|
||||
|
||||
// TODO: don't error out here
|
||||
emails, err := s.domain.Search(ctx, "", req.Email)
|
||||
if err != nil {
|
||||
if err != nil && err.Error() != "not found" {
|
||||
return err
|
||||
}
|
||||
if len(emails) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user