From d2c03d9417fb289d455f80f4c6facd7274c31d3e Mon Sep 17 00:00:00 2001 From: Biswa Kalyan Bhuyan Date: Mon, 28 Apr 2025 08:32:07 +0530 Subject: finance/backend: feat: Refined APIs for Loans and Goals based on frontend needs --- backend/internal/router/router.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'backend/internal/router/router.go') diff --git a/backend/internal/router/router.go b/backend/internal/router/router.go index d6e05a5..42753b4 100644 --- a/backend/internal/router/router.go +++ b/backend/internal/router/router.go @@ -122,6 +122,12 @@ func SetupRouter(cfg *config.Config) *gin.Engine { 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) } } -- cgit v1.2.3-59-g8ed1b