Update for product fetching
This commit is contained in:
1 parent
caa8b76c88
commit
fb4f91a1d6
2 files changed
+39
-61
No files matched your search
@@ -20,10 +20,14 @@ def get_product_info(id: int):
|
||||
fields = ['name', 'price', 'image', 'image_name', 'seller']
|
||||
|
||||
fields_param = request.args.get('fields')
|
||||
requested_fields = []
|
||||
|
||||
return abort(501)
|
||||
|
||||
fields_param_list = fields_param.split(',') if fields_param else fields
|
||||
|
||||
common_fields = list(set(fields) & set(fields_param_list))
|
||||
|
||||
result, status_code = ProductService.get_product_info(common_fields, id)
|
||||
|
||||
return result, status_code
|
||||
|
||||
@bp_product.route('/create', methods=['POST'])
|
||||
def create_product_listing():
|
||||
|
||||
Reference in new issue
Block a user