diff --git a/internal/router/router.go b/internal/router/router.go index 1d2140f..419b429 100644 --- a/internal/router/router.go +++ b/internal/router/router.go @@ -75,7 +75,8 @@ func Setup(db *gorm.DB, yunAPIClient *service.YunAPIClient, cfg *config.Config) classificationService := service.NewClassificationService(classificationRepo, categoryRepo) transactionService := service.NewTransactionService(transactionRepo, accountRepo, categoryRepo, tagRepo, ledgerRepo, db) imageService := service.NewImageService(transactionImageRepo, transactionRepo, db, cfg.ImageUploadDir) - recurringService := service.NewRecurringTransactionService(recurringRepo, transactionRepo, accountRepo, categoryRepo, allocationRuleRepo, allocationRecordRepo, piggyBankRepo, userSettingsRepo, db) + smsService := service.NewSmsService(cfg) + recurringService := service.NewRecurringTransactionService(recurringRepo, transactionRepo, accountRepo, categoryRepo, allocationRuleRepo, allocationRecordRepo, piggyBankRepo, userSettingsRepo, smsService, db) exchangeRateService := service.NewExchangeRateService(exchangeRateRepo) reportService := service.NewReportService(reportRepo, exchangeRateRepo) pdfExportService := service.NewPDFExportService(reportRepo, transactionRepo, exchangeRateRepo) @@ -355,7 +356,8 @@ func SetupWithRedis(db *gorm.DB, yunAPIClient *service.YunAPIClient, redisClient classificationService := service.NewClassificationService(classificationRepo, categoryRepo) transactionService := service.NewTransactionService(transactionRepo, accountRepo, categoryRepo, tagRepo, ledgerRepo, db) imageService := service.NewImageService(transactionImageRepo, transactionRepo, db, cfg.ImageUploadDir) - recurringService := service.NewRecurringTransactionService(recurringRepo, transactionRepo, accountRepo, categoryRepo, allocationRuleRepo, allocationRecordRepo, piggyBankRepo, userSettingsRepo, db) + smsService := service.NewSmsService(cfg) + recurringService := service.NewRecurringTransactionService(recurringRepo, transactionRepo, accountRepo, categoryRepo, allocationRuleRepo, allocationRecordRepo, piggyBankRepo, userSettingsRepo, smsService, db) reportService := service.NewReportService(reportRepo, exchangeRateRepo) pdfExportService := service.NewPDFExportService(reportRepo, transactionRepo, exchangeRateRepo) excelExportService := service.NewExcelExportService(reportRepo, transactionRepo, exchangeRateRepo)