feat: gateway
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build is passing

This commit is contained in:
vaalacat
2024-04-23 11:18:16 +00:00
parent a42fecfc63
commit 75944abbc2
13 changed files with 404 additions and 87 deletions

View File

@@ -2,7 +2,6 @@ package database
import (
"github.com/joho/godotenv"
"github.com/sirupsen/logrus"
"gorm.io/gorm"
)
@@ -15,10 +14,10 @@ func GetDB() *gorm.DB {
return GetSqlite()
}
func CloseDB(db *gorm.DB) {
tdb, err := db.DB()
if err != nil {
logrus.WithError(err).Errorf("Close DB error")
}
tdb.Close()
}
// func CloseDB(db *gorm.DB) {
// tdb, err := db.DB()
// if err != nil {
// logrus.WithError(err).Errorf("Close DB error")
// }
// tdb.Close()
// }