Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 70876a48e2 |
+11
-2
@@ -1,3 +1,4 @@
|
|||||||
|
from threading import Thread
|
||||||
from flask import Blueprint, request, jsonify, current_app
|
from flask import Blueprint, request, jsonify, current_app
|
||||||
import requests
|
import requests
|
||||||
from app.extensions import db
|
from app.extensions import db
|
||||||
@@ -194,8 +195,16 @@ def direct_loan():
|
|||||||
"productId": str(loan_data.get('productId', "")),
|
"productId": str(loan_data.get('productId', "")),
|
||||||
"provideAmount": loan_data.get('currentLoanAmount'),
|
"provideAmount": loan_data.get('currentLoanAmount'),
|
||||||
}
|
}
|
||||||
response = SimbrellaClient.disburse_loan(data_to_process)
|
|
||||||
return response
|
|
||||||
|
logger.info(f"Starting disbursement thread for {data_to_process['transactionId']}")
|
||||||
|
thread = Thread(target=SimbrellaClient.disburse_loan, args=(data_to_process,))
|
||||||
|
thread.start()
|
||||||
|
|
||||||
|
return jsonify({
|
||||||
|
"status": "success",
|
||||||
|
"message": f"Loan disbursement has been queued for processing."
|
||||||
|
}), 200
|
||||||
|
|
||||||
@autocall_bp.route("/direct/repayment", methods=["POST"])
|
@autocall_bp.route("/direct/repayment", methods=["POST"])
|
||||||
def direct_repayment():
|
def direct_repayment():
|
||||||
|
|||||||
Reference in New Issue
Block a user