Loan insert
This commit is contained in:
+6
-1
@@ -293,9 +293,14 @@ def salary_loanapply2():
|
||||
if loan != '' and bvn != '' and amount > 0 :
|
||||
loan = load_offer(loan,bvn)
|
||||
INSERT_LOAN ="INSERT INTO loan_apply (loan, bvn, amount) VALUES(%s, %s, %s)"
|
||||
new_data = (loan,bvn, amount)
|
||||
with connection:
|
||||
with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor:
|
||||
cursor.execute(INSERT_LOAN, new_data)
|
||||
|
||||
return {
|
||||
"message": "REQUEST_PIN",
|
||||
"loan": loan,
|
||||
"loan_application_id": '70581361-c2ec-4d6a-93f0-d5c0f2516a00',
|
||||
"active_loan_count": 0,
|
||||
"active_loan": []
|
||||
}, 201
|
||||
|
||||
Reference in New Issue
Block a user