fix verify data
This commit is contained in:
+17
-1
@@ -343,13 +343,14 @@ def salary_verifloan2():
|
|||||||
pin = data["pin"]
|
pin = data["pin"]
|
||||||
loan_application_id = data["loan_application_id"]
|
loan_application_id = data["loan_application_id"]
|
||||||
SELECT_ACC = "SELECT id, uid,pin,bvn FROM demo_bank_accounts WHERE bvn='" + bvn + "' AND pin = '" + pin + "' "
|
SELECT_ACC = "SELECT id, uid,pin,bvn FROM demo_bank_accounts WHERE bvn='" + bvn + "' AND pin = '" + pin + "' "
|
||||||
|
print(SELECT_ACC)
|
||||||
with connection:
|
with connection:
|
||||||
with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor:
|
with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor:
|
||||||
cursor.execute(SELECT_ACC)
|
cursor.execute(SELECT_ACC)
|
||||||
account = cursor.fetchall()
|
account = cursor.fetchall()
|
||||||
|
|
||||||
account_found = count = len( account )
|
account_found = count = len( account )
|
||||||
|
print("10000-a")
|
||||||
if account_found == 1 :
|
if account_found == 1 :
|
||||||
return {
|
return {
|
||||||
"status": "1",
|
"status": "1",
|
||||||
@@ -364,6 +365,9 @@ def salary_verifloan2():
|
|||||||
"error": "1"
|
"error": "1"
|
||||||
}, 404
|
}, 404
|
||||||
|
|
||||||
|
# let us verify the loan too with the UID
|
||||||
|
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return {
|
return {
|
||||||
"status": "0",
|
"status": "0",
|
||||||
@@ -418,5 +422,17 @@ def offers_detail(offer_id):
|
|||||||
return offer_detail
|
return offer_detail
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/office/auth')
|
||||||
|
def office_login():
|
||||||
|
result_data = {
|
||||||
|
"data": [],
|
||||||
|
"extra" : []
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
"result_data": result_data,
|
||||||
|
}, 200
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run(host='0.0.0.0', port=8000)
|
app.run(host='0.0.0.0', port=8000)
|
||||||
Reference in New Issue
Block a user