fix bugs
This commit is contained in:
@@ -38,17 +38,17 @@ func InitTeamHandler(ctx context.Context, cfg *config.Config, db *gorm.DB) (*con
|
||||
|
||||
func InitAPIHandler(ctx context.Context, cfg *config.Config, db *gorm.DB) (*controller2.Api, error) {
|
||||
userDAO := dao.NewUserDAO(db)
|
||||
userServiceImpl := service2.NewUserService(db, userDAO)
|
||||
userServiceImpl := service2.NewUserService(cfg, db, userDAO)
|
||||
tokenDAO := dao.NewTokenDAO(db)
|
||||
tokenServiceImpl := service2.NewTokenService(db, tokenDAO)
|
||||
apiKeyDAO := dao.NewApiKeyDAO(db)
|
||||
apiKeyServiceImpl := service2.NewApiKeyService(db, apiKeyDAO)
|
||||
webAuthnService, err := service2.NewWebAuthnService(db, cfg)
|
||||
webAuthnService, err := service2.NewWebAuthnService(cfg, db)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
usageService := service2.NewUsageService(ctx, cfg, db)
|
||||
api := controller2.NewApi(db, userServiceImpl, tokenServiceImpl, apiKeyServiceImpl, webAuthnService, usageService)
|
||||
api := controller2.NewApi(cfg, db, userServiceImpl, tokenServiceImpl, apiKeyServiceImpl, webAuthnService, usageService)
|
||||
return api, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user