From 2e0b9c97af457da5c6afda611d48e59047d4cdb8 Mon Sep 17 00:00:00 2001 From: JJ Date: Mon, 31 Mar 2025 21:08:41 +0100 Subject: Basic AI functionality --- scripts/recipes/handle_recipes.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/recipes/handle_recipes.py') diff --git a/scripts/recipes/handle_recipes.py b/scripts/recipes/handle_recipes.py index 22ba0a4..73d19be 100644 --- a/scripts/recipes/handle_recipes.py +++ b/scripts/recipes/handle_recipes.py @@ -1,10 +1,12 @@ from bson.objectid import ObjectId +from flask import session from scripts.database.mongo import mongo_database from scripts.scraping.scraper import scrape mongo_collection = mongo_database.get_collection("recipes") def add_single_recipe(recipe): + recipe["user"] = session["username"] added_recipe = mongo_collection.insert_one(recipe) new_recipe = mongo_collection.find_one() return added_recipe -- cgit v1.2.3