Files
radiantwave-legacy/internal/db/queries.go
T
2026-06-26 23:21:05 -05:00

15 lines
257 B
Go

package db
import "gorm.io/gorm"
// GetConfig fetches the application config from the database
func GetConfig(db *gorm.DB) (*AppConfig, error) {
var cfg AppConfig
err := db.First(&cfg, 1).Error
if err != nil {
return nil, err
}
return &cfg, err
}