diff options
Diffstat (limited to 'backend/internal/router')
-rw-r--r-- | backend/internal/router/router.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/backend/internal/router/router.go b/backend/internal/router/router.go index 3a4d413..42753b4 100644 --- a/backend/internal/router/router.go +++ b/backend/internal/router/router.go @@ -110,12 +110,24 @@ func SetupRouter(cfg *config.Config) *gin.Engine { protected.DELETE("/goals/:id", goalHandler.DeleteGoal) protected.PATCH("/goals/:id/progress", goalHandler.UpdateGoalProgress) + // New Goal Progress Tracking routes + protected.GET("/goals/:id/progress", goalHandler.GetGoalProgressDetails) + protected.GET("/goals/progress/all", goalHandler.GetAllGoalsProgressDetails) + protected.POST("/goals/:id/link-transaction", goalHandler.LinkTransactionToGoal) + protected.POST("/goals/:id/recalculate", goalHandler.RecalculateGoalProgress) + // Loan routes protected.GET("/loans", loanHandler.GetLoans) protected.GET("/loans/:id", loanHandler.GetLoanByID) protected.POST("/loans", loanHandler.CreateLoan) protected.PUT("/loans/:id", loanHandler.UpdateLoan) protected.DELETE("/loans/:id", loanHandler.DeleteLoan) + + // Loan payment routes + protected.GET("/loans/:id/payments", loanHandler.GetLoanPayments) + protected.POST("/loans/:id/payments", loanHandler.CreateLoanPayment) + protected.DELETE("/loans/:id/payments/:paymentId", loanHandler.DeleteLoanPayment) + protected.GET("/loans/:id/payment-schedule", loanHandler.GetLoanPaymentSchedule) } } |