summaryrefslogtreecommitdiff
path: root/internal/server/api
diff options
context:
space:
mode:
Diffstat (limited to 'internal/server/api')
-rw-r--r--internal/server/api/database.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/internal/server/api/database.go b/internal/server/api/database.go
index 3546395..a137746 100644
--- a/internal/server/api/database.go
+++ b/internal/server/api/database.go
@@ -36,10 +36,8 @@ func ConnectToDatabase() {
log.Println("database connection ready to be used")
}
-func CloseDatabase() {
- assert.NotNil(db, "db should only be closed if it exists")
- db.Close()
- log.Println("connection with database closed")
+func DB() *sql.DB {
+ return db
}
func demo() {