Add registration Settings

This commit is contained in:
2025-10-24 08:25:16 +08:00
parent 1aff8ff459
commit 3d4f3e3f82
7 changed files with 511 additions and 25 deletions

View File

@@ -78,7 +78,7 @@ func GetDB() (*gorm.DB, error) {
func initSQLite() error {
path := viper.GetString("database.sqlite.path")
if path == "" {
path = "./recharge.db"
path = "./database.db"
}
dsn := fmt.Sprintf("file:%s?cache=shared&_busy_timeout=5000&_fk=1", path)
db, err := gorm.Open(sqlite.Open(dsn), &gorm.Config{})