aboutsummaryrefslogtreecommitdiffstats
path: root/backend/internal/router/router.go
diff options
context:
space:
mode:
authorLibravatarLibravatar Biswa Kalyan Bhuyan <biswa@surgot.in> 2025-04-28 08:32:07 +0530
committerLibravatarLibravatar Biswa Kalyan Bhuyan <biswa@surgot.in> 2025-04-28 08:32:07 +0530
commitd2c03d9417fb289d455f80f4c6facd7274c31d3e (patch)
tree3de135eb932ff20aa50abfb39d5a8abba4758d65 /backend/internal/router/router.go
parent538d933baef56d7ee76f78617b553d63713efa24 (diff)
downloadfinance-d2c03d9417fb289d455f80f4c6facd7274c31d3e.tar.gz
finance-d2c03d9417fb289d455f80f4c6facd7274c31d3e.tar.bz2
finance-d2c03d9417fb289d455f80f4c6facd7274c31d3e.zip
finance/backend: feat: Refined APIs for Loans and Goals based on frontend needsHEADmaster
Diffstat (limited to 'backend/internal/router/router.go')
-rw-r--r--backend/internal/router/router.go6
1 files changed, 6 insertions, 0 deletions
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)
}
}