@@ -260,7 +260,7 @@ def get_category_products(c_id):
260260 .filter (category_subcategory .c .category_id == c_id )
261261 .distinct ()
262262 .order_by (Product .id .asc ())
263- .paginate (page = page , per_page = 2 , error_out = False )
263+ .paginate (page = page , per_page = 10 , error_out = False )
264264 )
265265
266266 return {
@@ -536,7 +536,7 @@ def get_subcategory_products(sc_id):
536536
537537 try :
538538 page = request .args .get ("page" , default = 1 , type = int )
539- products = subcategory .products .order_by (Product .id .asc ()).paginate (page = page , per_page = 2 , error_out = False )
539+ products = subcategory .products .order_by (Product .id .asc ()).paginate (page = page , per_page = 10 , error_out = False )
540540 return {
541541 "products" : [p .to_json () for p in products ]
542542 }, 200
@@ -776,7 +776,7 @@ def get_all_products():
776776 description: A list of products for that page.
777777 """
778778 page = request .args .get ("page" , default = 1 , type = int )
779- products = Product .query .order_by (Product .id .asc ()).paginate (page = page , per_page = 2 , error_out = False )
779+ products = Product .query .order_by (Product .id .asc ()).paginate (page = page , per_page = 10 , error_out = False )
780780 return jsonify ({"products" : [product .to_json () for product in products ]}), 200
781781
782782
0 commit comments