fix verify data

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