order by name
This commit is contained in:
		@@ -65,7 +65,7 @@ def get_products():
 | 
			
		||||
    try:
 | 
			
		||||
        conn = psycopg2.connect()
 | 
			
		||||
        with conn.cursor() as cursor:
 | 
			
		||||
            cursor.execute('SELECT name FROM nutrition_table')
 | 
			
		||||
            cursor.execute('SELECT name FROM nutrition_table ORDER BY name')
 | 
			
		||||
            products = cursor.fetchall()
 | 
			
		||||
            return {'products': [product[0] for product in products]}
 | 
			
		||||
    finally:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user