From da5154297cc1417567c1f6368f1fdafd35f8c5ce Mon Sep 17 00:00:00 2001 From: Till Faelligen Date: Mon, 1 Jun 2020 14:09:17 +0200 Subject: [PATCH] Remove check for account and use returned error --- cmd/create-account/main.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cmd/create-account/main.go b/cmd/create-account/main.go index eca9b2fe6..9c1e45932 100644 --- a/cmd/create-account/main.go +++ b/cmd/create-account/main.go @@ -69,13 +69,10 @@ func main() { os.Exit(1) } - account, err := accountDB.CreateAccount(context.Background(), *username, *password, "") + _, 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, nil, serverName)