fix
This commit is contained in:
		@@ -94,7 +94,7 @@ def calculate_nutrition(food, weight):
 | 
				
			|||||||
# Index-Route
 | 
					# Index-Route
 | 
				
			||||||
@app.route('/')
 | 
					@app.route('/')
 | 
				
			||||||
@oidc.require_login
 | 
					@oidc.require_login
 | 
				
			||||||
@oidc.require_keycloak_role('user')
 | 
					@oidc.require_keycloak_role('nutri', 'user')
 | 
				
			||||||
def index():
 | 
					def index():
 | 
				
			||||||
    return render_template('index.html')
 | 
					    return render_template('index.html')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -102,7 +102,7 @@ def index():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
@app.route('/get_products')
 | 
					@app.route('/get_products')
 | 
				
			||||||
@oidc.require_login
 | 
					@oidc.require_login
 | 
				
			||||||
@oidc.require_keycloak_role('user')
 | 
					@oidc.require_keycloak_role('nutri', 'user')
 | 
				
			||||||
def get_products():
 | 
					def get_products():
 | 
				
			||||||
    conn = get_db_connection()
 | 
					    conn = get_db_connection()
 | 
				
			||||||
    cursor = conn.cursor()
 | 
					    cursor = conn.cursor()
 | 
				
			||||||
@@ -119,7 +119,7 @@ def get_products():
 | 
				
			|||||||
# Route zum Hinzufügen und Berechnen von Lebensmitteln
 | 
					# Route zum Hinzufügen und Berechnen von Lebensmitteln
 | 
				
			||||||
@app.route('/add_lm', methods=['GET'])
 | 
					@app.route('/add_lm', methods=['GET'])
 | 
				
			||||||
@oidc.require_login
 | 
					@oidc.require_login
 | 
				
			||||||
@oidc.require_keycloak_role('user')
 | 
					@oidc.require_keycloak_role('nutri', 'user')
 | 
				
			||||||
def add_lm():
 | 
					def add_lm():
 | 
				
			||||||
    food = request.args.get('food')
 | 
					    food = request.args.get('food')
 | 
				
			||||||
    weight = float(request.args.get('weight'))
 | 
					    weight = float(request.args.get('weight'))
 | 
				
			||||||
@@ -167,7 +167,7 @@ def add_nutrition():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
@app.route('/nutrition')
 | 
					@app.route('/nutrition')
 | 
				
			||||||
@oidc.require_login
 | 
					@oidc.require_login
 | 
				
			||||||
@oidc.require_keycloak_role('user')
 | 
					@oidc.require_keycloak_role('nutri', 'user')
 | 
				
			||||||
def nutrition():
 | 
					def nutrition():
 | 
				
			||||||
    return render_template('nutrition.html')
 | 
					    return render_template('nutrition.html')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user