Fixed program exiting when user in config already existed
This commit is contained in:
parent
41eaffba6d
commit
24ec279fd5
|
@ -63,7 +63,10 @@ func SetEngine() (err error) {
|
||||||
if !exists {
|
if !exists {
|
||||||
_, err = CreateUser(Config.FirstUser)
|
_, err = CreateUser(Config.FirstUser)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
// Janky hack, I know
|
||||||
|
if err.Error() != "this username is already taken. Please use another" {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fmt.Println("Created new user " + Config.FirstUser.Username)
|
fmt.Println("Created new user " + Config.FirstUser.Username)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user