This commit is contained in:
2024-06-01 16:07:34 -07:00
parent 635f2650e9
commit df4dbfdb1b
3 changed files with 7 additions and 8 deletions

View File

@@ -78,7 +78,7 @@ func (d *Database) Get() (*gorm.DB, error) {
}
func (d *Database) Connect() error {
dsn := d.params.Config.DatabaseDSN
dsn := d.params.Config.DBDSN
if dsn == "" {
err := errors.New("database DSN is empty")
d.log.Error().Err(err).Msg("failed to get database DSN from config")
@@ -123,4 +123,3 @@ func (d *Database) Ping() error {
d.log.Info().Msg("successfully pinged the database")
return nil
}