diff --git a/api/owner_new.go b/api/owner_new.go index 66b1321..26a9b9a 100644 --- a/api/owner_new.go +++ b/api/owner_new.go @@ -16,6 +16,10 @@ func ownerNew(email string, name string, password string) (string, error) { return "", errorNewOwnerForbidden } + if _, err := ownerGetByEmail(email); err == nil { + return "", errorEmailAlreadyExists + } + ownerHex, err := randomHex(32) if err != nil { logger.Errorf("cannot generate ownerHex: %v", err)