mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 09:23:09 -06:00
create-account cmd: user already exists error message
This commit is contained in:
parent
afe51d07e8
commit
2ded148e0b
|
|
@ -69,10 +69,13 @@ func main() {
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
_, err = accountDB.CreateAccount(context.Background(), *username, *password)
|
||||
account, err := accountDB.CreateAccount(context.Background(), *username, *password)
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
os.Exit(1)
|
||||
} else if account == nil {
|
||||
fmt.Println("Username already exists")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
deviceDB, err := devices.NewDatabase(*database, serverName)
|
||||
|
|
|
|||
Loading…
Reference in a new issue