prouduct data
This commit is contained in:
+18
-6
@@ -100,12 +100,7 @@ def salary_demousers():
|
|||||||
|
|
||||||
demo_data = {
|
demo_data = {
|
||||||
"last_update": datetime.datetime.utcnow(),
|
"last_update": datetime.datetime.utcnow(),
|
||||||
"offers": [
|
"offers":products(),
|
||||||
{"cid": "1", "description": "Product Loan 01" },
|
|
||||||
{"cid": "2", "description": "Product Loan 02" },
|
|
||||||
{"cid": "3", "description": "Product Loan 03" },
|
|
||||||
{"cid": "4", "description": "Product Loan 04" },
|
|
||||||
],
|
|
||||||
"list" : dList
|
"list" : dList
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
@@ -113,6 +108,23 @@ def salary_demousers():
|
|||||||
}, 200
|
}, 200
|
||||||
# return jsonify(demo_data=demo_data)
|
# return jsonify(demo_data=demo_data)
|
||||||
|
|
||||||
|
@app.route('/salary/products')
|
||||||
|
def salary_products():
|
||||||
|
product_data = {
|
||||||
|
"products": products() ,
|
||||||
|
"extra" : []
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
"product_data": product_data,
|
||||||
|
}, 200
|
||||||
|
|
||||||
|
def products():
|
||||||
|
product_data = [
|
||||||
|
{"cid": "1", "description": "Product Loan 01" , "active" : 0 },
|
||||||
|
{"cid": "2", "description": "Product Loan 02" , "active" : 0 },
|
||||||
|
{"cid": "3", "description": "First Advance" , "active" : 1 },
|
||||||
|
]
|
||||||
|
return product_data
|
||||||
|
|
||||||
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