about summary refs log tree commit diff
path: root/db_actions.go
diff options
context:
space:
mode:
Diffstat (limited to 'db_actions.go')
-rw-r--r--db_actions.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/db_actions.go b/db_actions.go
index c6ed041..8a3bdf8 100644
--- a/db_actions.go
+++ b/db_actions.go
@@ -43,8 +43,8 @@ var (
 )
 
 // connectToDB returns a pointer to an sql database writing to the database
-func ConnectToDB() *sql.DB {
-	connStr := fmt.Sprintf("user=%s dbname=%s sslmode=%s", DBUSER, DBNAME, DBSSLMODE)
+func ConnectToDB(dbname) *sql.DB {
+	connStr := fmt.Sprintf("user=%s dbname=%s sslmode=%s", DBUSER, dbname, DBSSLMODE)
 	db := dbConnect(connStr)
 	return db
 }