fix message
This commit is contained in:
+20
-1
@@ -81,13 +81,32 @@ CREATE TABLE loan_apply (
|
|||||||
loan VARCHAR(25) NOT NULL,
|
loan VARCHAR(25) NOT NULL,
|
||||||
bvn VARCHAR(12) NOT NULL,
|
bvn VARCHAR(12) NOT NULL,
|
||||||
amount INT DEFAULT 0,
|
amount INT DEFAULT 0,
|
||||||
added timestamp without time zone DEFAULT now()
|
added timestamp without time zone DEFAULT now(),
|
||||||
|
verified timestamp
|
||||||
);
|
);
|
||||||
ALTER TABLE ONLY loan_apply
|
ALTER TABLE ONLY loan_apply
|
||||||
ADD CONSTRAINT loan_apply_id_key UNIQUE (id);
|
ADD CONSTRAINT loan_apply_id_key UNIQUE (id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE loans (
|
||||||
|
id SERIAL,
|
||||||
|
uid uuid DEFAULT uuid_generate_v4(),
|
||||||
|
bvn VARCHAR(12) NOT NULL,
|
||||||
|
loan VARCHAR(25) REFERENCES loan_offers (loan),
|
||||||
|
approved_amount INT DEFAULT 0,
|
||||||
|
initial_deduction INT DEFAULT 0,
|
||||||
|
days_duration INT DEFAULT 0,
|
||||||
|
added timestamp without time zone DEFAULT now(),
|
||||||
|
due_date timestamp
|
||||||
|
);
|
||||||
|
ALTER TABLE ONLY loans
|
||||||
|
ADD CONSTRAINT loans_id_key UNIQUE (id);
|
||||||
|
|
||||||
|
|
||||||
|
--- ALTER TABLE loan_apply ADD verified timestamp;
|
||||||
|
|
||||||
|
|
||||||
{"cid": "425611f2-c692-4404-b93d-76ca7a5ce00", "description": "100,000 Naira for 30 Days" , "active" : 1 },
|
{"cid": "425611f2-c692-4404-b93d-76ca7a5ce00", "description": "100,000 Naira for 30 Days" , "active" : 1 },
|
||||||
{"cid": "425611f2-c692-4404-b93d-76ca7a5ce01", "description": "300,000 Naira for 60 Days" , "active" : 1 },
|
{"cid": "425611f2-c692-4404-b93d-76ca7a5ce01", "description": "300,000 Naira for 60 Days" , "active" : 1 },
|
||||||
{"cid": "425611f2-c692-4404-b93d-76ca7a5ce02", "description": "900,000 Naira for 90 Days" , "active" : 1 },
|
{"cid": "425611f2-c692-4404-b93d-76ca7a5ce02", "description": "900,000 Naira for 90 Days" , "active" : 1 },
|
||||||
|
|||||||
+8
-1
@@ -352,6 +352,11 @@ def salary_verifloan2():
|
|||||||
account_found = count = len( account )
|
account_found = count = len( account )
|
||||||
print("10000-a")
|
print("10000-a")
|
||||||
if account_found == 1 :
|
if account_found == 1 :
|
||||||
|
UPDATE_APPLICATION = "UPDATE loan_apply SET verified = now() WHERE uid::text = '" + loan_application_id + "' "
|
||||||
|
with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor:
|
||||||
|
cursor.execute(UPDATE_APPLICATION)
|
||||||
|
|
||||||
|
loan_create(bvn,loan_application_id)
|
||||||
return {
|
return {
|
||||||
"status": "1",
|
"status": "1",
|
||||||
"message" : "Loan Verified",
|
"message" : "Loan Verified",
|
||||||
@@ -361,7 +366,7 @@ def salary_verifloan2():
|
|||||||
return {
|
return {
|
||||||
"status": "-1",
|
"status": "-1",
|
||||||
"data": None,
|
"data": None,
|
||||||
"message" : "Invalid Loan",
|
"message" : "Invalid Loan or PIN",
|
||||||
"error": "1"
|
"error": "1"
|
||||||
}, 404
|
}, 404
|
||||||
|
|
||||||
@@ -376,6 +381,8 @@ def salary_verifloan2():
|
|||||||
"data": None
|
"data": None
|
||||||
}, 500
|
}, 500
|
||||||
|
|
||||||
|
def loan_create(bvn,loan_application_id):
|
||||||
|
pass
|
||||||
|
|
||||||
def products():
|
def products():
|
||||||
product_data = [
|
product_data = [
|
||||||
|
|||||||
Reference in New Issue
Block a user