added failed loans endpoint

This commit was merged in pull request #70.
This commit is contained in:
Chinenye Nmoh
2026-04-05 16:53:02 +01:00
parent f1db12c7f2
commit c32c2502cc
7 changed files with 183 additions and 2 deletions
+15
View File
@@ -59,6 +59,21 @@ class LoanService:
def set_disbursement_loan_description(cls,loan_id,description):
return Loan.set_disbursement_message(loan_id, description)
@classmethod
def get_failed_disbursements(cls):
"""
Get all loans with failed disbursement.
"""
return Loan.get_failed_disbursements()
@classmethod
def update_status(cls, loan_id, status):
"""
Update the status of the loan with the given loan_id.
"""
# Retrieve loan
return Loan.update_status(loan_id, status)
@classmethod