feat(treasurechest): #64 implement hirarchical treasure chests
This commit was merged in pull request #65.
This commit is contained in:
14
main.go
14
main.go
@@ -108,21 +108,25 @@ func createHandler(d *sqlx.DB, serverSettings *types.Settings) http.Handler {
|
||||
|
||||
authDb := db.NewAuthSqlite(d)
|
||||
accountDb := db.NewAccountSqlite(d)
|
||||
treasureChestDb := db.NewTreasureChestSqlite(d)
|
||||
|
||||
randomService := service.NewRandomImpl()
|
||||
clockService := service.NewClockImpl()
|
||||
mailService := service.NewMailImpl(serverSettings)
|
||||
randomService := service.NewRandom()
|
||||
clockService := service.NewClock()
|
||||
mailService := service.NewMail(serverSettings)
|
||||
|
||||
authService := service.NewAuthImpl(authDb, randomService, clockService, mailService, serverSettings)
|
||||
accountService := service.NewAccountImpl(accountDb, randomService, clockService, serverSettings)
|
||||
authService := service.NewAuth(authDb, randomService, clockService, mailService, serverSettings)
|
||||
accountService := service.NewAccount(accountDb, randomService, clockService, serverSettings)
|
||||
treasureChestService := service.NewTreasureChest(treasureChestDb, randomService, clockService, serverSettings)
|
||||
|
||||
render := handler.NewRender()
|
||||
indexHandler := handler.NewIndex(authService, render)
|
||||
authHandler := handler.NewAuth(authService, render)
|
||||
accountHandler := handler.NewAccount(accountService, authService, render)
|
||||
treasureChestHandler := handler.NewTreasureChest(treasureChestService, authService, render)
|
||||
|
||||
indexHandler.Handle(router)
|
||||
accountHandler.Handle(router)
|
||||
treasureChestHandler.Handle(router)
|
||||
authHandler.Handle(router)
|
||||
|
||||
// Serve static files (CSS, JS and images)
|
||||
|
||||
Reference in New Issue
Block a user