feat(confg): reload on save and refactor logging (#275)

* feat(confg): reload on save

* refactor(logging): rework
This commit is contained in:
Ludvig Lundgren 2022-05-20 09:27:01 +02:00 committed by GitHub
parent 198528a474
commit 91b094f4f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
56 changed files with 995 additions and 873 deletions

View file

@ -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":