fix category
This commit is contained in:
@@ -34,6 +34,26 @@ class ContactService(BaseService):
|
||||
uid = validated_data.get('uid')
|
||||
|
||||
cat_list = ['A000002', 'A000004', 'A000001', 'A000003']
|
||||
|
||||
category_data = [
|
||||
{
|
||||
"cid": "1",
|
||||
"description": "category 01"
|
||||
},
|
||||
{
|
||||
"cid": "2",
|
||||
"description": "category 02"
|
||||
},
|
||||
{
|
||||
"cid": "3",
|
||||
"description": "category 03"
|
||||
},
|
||||
{
|
||||
"cid": "4",
|
||||
"description": "category 04"
|
||||
}
|
||||
]
|
||||
|
||||
# SUPPORTED_CATEGORY = "SELECT name AS title,product_id from products WHERE product_id IN ('A000002','A000004','A000001','A000003')"
|
||||
# with connection:
|
||||
# with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor:
|
||||
@@ -61,7 +81,7 @@ class ContactService(BaseService):
|
||||
|
||||
response_data = {
|
||||
"last_update": datetime.datetime.utcnow(),
|
||||
"category": cat_list,
|
||||
"category": category_data,
|
||||
"contacts": dList
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user