Beispiel #1
0
def admin_my_recipes_delete():
    if not 'user_id' in session:
        return redirect(url_for('login_name'))
    if session['user_id'] != 0:
        return "You don't have the access!"
    user_id = request.args['current_user_id']
    database = Database(filename)
    database.deleteMyRecipeEntry(user_id, request.args['id'])
    return redirect(url_for('admin_my_recipes', user_id=user_id))
Beispiel #2
0
def my_recipes_delete():
    user_id = session['user_id']
    database = Database(filename)
    database.deleteMyRecipeEntry(user_id, request.args['id'])
    return redirect(url_for('my_recipes'))