diff --git a/main.go b/main.go index 818a1f7..67a4283 100644 --- a/main.go +++ b/main.go @@ -123,10 +123,10 @@ func createHandler(d *sqlx.DB, serverSettings *types.Settings) http.Handler { mailService := service.NewMail(serverSettings) authService := service.NewAuth(authDb, randomService, clockService, mailService, serverSettings) - accountService := service.NewAccount(d, randomService, clockService, serverSettings) - treasureChestService := service.NewTreasureChest(d, randomService, clockService, serverSettings) - transactionService := service.NewTransaction(d, randomService, clockService, serverSettings) - transactionRecurringService := service.NewTransactionRecurring(d, randomService, clockService, serverSettings) + accountService := service.NewAccount(d, randomService, clockService) + treasureChestService := service.NewTreasureChest(d, randomService, clockService) + transactionService := service.NewTransaction(d, randomService, clockService) + transactionRecurringService := service.NewTransactionRecurring(d, randomService, clockService) render := handler.NewRender() indexHandler := handler.NewIndex(render) diff --git a/service/account.go b/service/account.go index 087a4e1..ce5174b 100644 --- a/service/account.go +++ b/service/account.go @@ -33,18 +33,16 @@ type Account interface { } type AccountImpl struct { - db *sqlx.DB - clock Clock - random Random - settings *types.Settings + db *sqlx.DB + clock Clock + random Random } -func NewAccount(db *sqlx.DB, random Random, clock Clock, settings *types.Settings) Account { +func NewAccount(db *sqlx.DB, random Random, clock Clock) Account { return AccountImpl{ - db: db, - clock: clock, - random: random, - settings: settings, + db: db, + clock: clock, + random: random, } } diff --git a/service/transaction.go b/service/transaction.go index 15a00cf..d02a9b3 100644 --- a/service/transaction.go +++ b/service/transaction.go @@ -37,18 +37,16 @@ type Transaction interface { } type TransactionImpl struct { - db *sqlx.DB - clock Clock - random Random - settings *types.Settings + db *sqlx.DB + clock Clock + random Random } -func NewTransaction(db *sqlx.DB, random Random, clock Clock, settings *types.Settings) Transaction { +func NewTransaction(db *sqlx.DB, random Random, clock Clock) Transaction { return TransactionImpl{ - db: db, - clock: clock, - random: random, - settings: settings, + db: db, + clock: clock, + random: random, } } diff --git a/service/transaction_recurring.go b/service/transaction_recurring.go index f3b92ab..e140127 100644 --- a/service/transaction_recurring.go +++ b/service/transaction_recurring.go @@ -36,18 +36,16 @@ type TransactionRecurring interface { } type TransactionRecurringImpl struct { - db *sqlx.DB - clock Clock - random Random - settings *types.Settings + db *sqlx.DB + clock Clock + random Random } -func NewTransactionRecurring(db *sqlx.DB, random Random, clock Clock, settings *types.Settings) TransactionRecurring { +func NewTransactionRecurring(db *sqlx.DB, random Random, clock Clock) TransactionRecurring { return TransactionRecurringImpl{ - db: db, - clock: clock, - random: random, - settings: settings, + db: db, + clock: clock, + random: random, } } diff --git a/service/treasure_chest.go b/service/treasure_chest.go index 4ad4db0..482db4d 100644 --- a/service/treasure_chest.go +++ b/service/treasure_chest.go @@ -34,18 +34,16 @@ type TreasureChest interface { } type TreasureChestImpl struct { - db *sqlx.DB - clock Clock - random Random - settings *types.Settings + db *sqlx.DB + clock Clock + random Random } -func NewTreasureChest(db *sqlx.DB, random Random, clock Clock, settings *types.Settings) TreasureChest { +func NewTreasureChest(db *sqlx.DB, random Random, clock Clock) TreasureChest { return TreasureChestImpl{ - db: db, - clock: clock, - random: random, - settings: settings, + db: db, + clock: clock, + random: random, } }