mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
feat(confg): reload on save and refactor logging (#275)
* feat(confg): reload on save * refactor(logging): rework
This commit is contained in:
parent
198528a474
commit
91b094f4f4
56 changed files with 995 additions and 873 deletions
|
@ -39,12 +39,12 @@ func main() {
|
|||
}
|
||||
|
||||
// open database connection
|
||||
db, _ := database.NewDB(domain.Config{ConfigPath: configPath, DatabaseType: "sqlite"})
|
||||
db, _ := database.NewDB(&domain.Config{ConfigPath: configPath, DatabaseType: "sqlite"}, nil)
|
||||
if err := db.Open(); err != nil {
|
||||
log.Fatal("could not open db connection")
|
||||
}
|
||||
|
||||
userRepo := database.NewUserRepo(db)
|
||||
userRepo := database.NewUserRepo(nil, db)
|
||||
|
||||
switch cmd := flag.Arg(0); cmd {
|
||||
case "create-user":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue