some cleanup
This commit is contained in:
@@ -32,9 +32,7 @@ var serveCmd = &cobra.Command{
|
||||
}
|
||||
conf := *config.Conf
|
||||
ctx := context.Background()
|
||||
db_url := "postgres://" + conf.Database.User + ":" + conf.Database.Password + "@" + conf.Database.Host + ":" + strconv.Itoa(conf.Database.Port) + "/" + conf.Database.Name
|
||||
db_url = db_url + "?sslmode=disable"
|
||||
conn, err := pgxpool.New(ctx, db_url)
|
||||
conn, err := pgxpool.New(ctx, conf.Database.URL().String())
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user