diff --git a/cmd/server/add.go b/cmd/server/add.go index a8db7ee..7d63f83 100644 --- a/cmd/server/add.go +++ b/cmd/server/add.go @@ -63,6 +63,8 @@ var addCmd = &cobra.Command{ Password: base64.StdEncoding.EncodeToString(ps), }) cobra.CheckErr(err) + + fmt.Println("Server saved") }, } diff --git a/database/sqlx.go b/database/sqlx.go index e0b0070..3d481ef 100644 --- a/database/sqlx.go +++ b/database/sqlx.go @@ -321,7 +321,7 @@ func (d *database) SetActiveServer(name string) error { ctx, cancel := d.timeout() defer cancel() - _, err = d.ExecContext(ctx, update) + _, err = d.ExecContext(ctx, update, name) return err }