chore: overhaul onboarding steps
This commit is contained in:
parent
acb7f511f9
commit
d413193366
12 changed files with 358 additions and 186 deletions
|
|
@ -21,22 +21,25 @@ func newTestApp(dbi testutil.DBInfo) *app.App {
|
|||
userRepo := repository.NewUserRepository(dbi.DB)
|
||||
tokenRepo := repository.NewTokenRepository(dbi.DB)
|
||||
spaceRepo := repository.NewSpaceRepository(dbi.DB)
|
||||
accountRepo := repository.NewAccountRepository(dbi.DB)
|
||||
inviteRepo := repository.NewInvitationRepository(dbi.DB)
|
||||
|
||||
spaceSvc := service.NewSpaceService(spaceRepo)
|
||||
accountSvc := service.NewAccountService(accountRepo)
|
||||
emailSvc := service.NewEmailService(nil, "test@example.com", "http://localhost:9999", "Budgit Test", false)
|
||||
authSvc := service.NewAuthService(emailSvc, userRepo, tokenRepo, spaceSvc, cfg.JWTSecret, cfg.JWTExpiry, cfg.TokenMagicLinkExpiry, false)
|
||||
authSvc := service.NewAuthService(emailSvc, userRepo, tokenRepo, spaceSvc, accountSvc, cfg.JWTSecret, cfg.JWTExpiry, cfg.TokenMagicLinkExpiry, false)
|
||||
userSvc := service.NewUserService(userRepo)
|
||||
inviteSvc := service.NewInviteService(inviteRepo, spaceRepo, userRepo, emailSvc)
|
||||
|
||||
return &app.App{
|
||||
Cfg: cfg,
|
||||
DB: dbi.DB,
|
||||
UserService: userSvc,
|
||||
AuthService: authSvc,
|
||||
EmailService: emailSvc,
|
||||
SpaceService: spaceSvc,
|
||||
InviteService: inviteSvc,
|
||||
Cfg: cfg,
|
||||
DB: dbi.DB,
|
||||
UserService: userSvc,
|
||||
AuthService: authSvc,
|
||||
EmailService: emailSvc,
|
||||
SpaceService: spaceSvc,
|
||||
AccountService: accountSvc,
|
||||
InviteService: inviteSvc,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue