fix ident
This commit is contained in:
+9
-9
@@ -540,15 +540,15 @@ def pending_loans():
|
|||||||
|
|
||||||
@app.route('/loan/repay', methods=["POST"])
|
@app.route('/loan/repay', methods=["POST"])
|
||||||
def repay_loans():
|
def repay_loans():
|
||||||
try:
|
try:
|
||||||
data = request.json
|
data = request.json
|
||||||
if not data:
|
if not data:
|
||||||
return {
|
return {
|
||||||
"message": "Please provide pin,loan_id,accountID",
|
"message": "Please provide pin,loan_id,accountID",
|
||||||
"data": None,
|
"data": None,
|
||||||
"error": "Bad request"
|
"error": "Bad request"
|
||||||
}, 400
|
}, 400
|
||||||
# validate input
|
# validate input
|
||||||
bvn = data["bvn"]
|
bvn = data["bvn"]
|
||||||
accountid = data["accountid"]
|
accountid = data["accountid"]
|
||||||
loan_id = data["bvn"]
|
loan_id = data["bvn"]
|
||||||
|
|||||||
Reference in New Issue
Block a user