Merge branch 'main' of http://124.221.157.197:3345/Novault/Novault-backend
This commit is contained in:
@@ -92,6 +92,12 @@ func Setup(db *gorm.DB, yunAPIClient *service.YunAPIClient, cfg *config.Config)
|
||||
interestService := service.NewInterestService(accountRepo, transactionRepo, db)
|
||||
userSettingsServiceWithAccounts := service.NewUserSettingsServiceWithAccountRepo(userSettingsRepo, accountRepo)
|
||||
|
||||
// Feature: notification-center - Initialize notification service
|
||||
notificationService := service.NewNotificationService(notificationRepo)
|
||||
|
||||
// Feature: health-score - Initialize health score service
|
||||
healthScoreService := service.NewHealthScoreService(reportRepo, accountRepo, budgetRepo)
|
||||
|
||||
// Initialize handlers
|
||||
accountHandler := handler.NewAccountHandler(accountService)
|
||||
categoryHandler := handler.NewCategoryHandler(categoryService)
|
||||
@@ -122,6 +128,12 @@ func Setup(db *gorm.DB, yunAPIClient *service.YunAPIClient, cfg *config.Config)
|
||||
defaultAccountHandler := handler.NewDefaultAccountHandler(userSettingsServiceWithAccounts)
|
||||
interestHandler := handler.NewInterestHandler(interestService, nil)
|
||||
|
||||
// Feature: notification-center - Initialize notification handler
|
||||
notificationHandler := handler.NewNotificationHandler(notificationService)
|
||||
|
||||
// Feature: health-score - Initialize health score handler
|
||||
healthScoreHandler := handler.NewHealthScoreHandler(healthScoreService)
|
||||
|
||||
// AI Bookkeeping Service and Handler
|
||||
aiBookkeepingService := service.NewAIBookkeepingService(
|
||||
cfg,
|
||||
@@ -219,6 +231,9 @@ func Setup(db *gorm.DB, yunAPIClient *service.YunAPIClient, cfg *config.Config)
|
||||
// AI bookkeeping routes
|
||||
aiHandler.RegisterRoutes(protected)
|
||||
|
||||
// Feature: notification-center - Register notification routes
|
||||
notificationHandler.RegisterRoutes(protected)
|
||||
|
||||
// Register report routes
|
||||
protected.GET("/reports/summary", reportHandler.GetTransactionSummary)
|
||||
protected.GET("/reports/category", reportHandler.GetCategorySummary)
|
||||
|
||||
Reference in New Issue
Block a user