diff options
author | JJ <nicetry@noemail.com> | 2025-03-31 21:08:41 +0100 |
---|---|---|
committer | JJ <nicetry@noemail.com> | 2025-03-31 21:08:41 +0100 |
commit | 2e0b9c97af457da5c6afda611d48e59047d4cdb8 (patch) | |
tree | 199d10037f790bcade2ac86f478c10da77bbc771 /scripts/recipes | |
parent | 17529f38f4b4edf7249e18418ddfcc3f818a006d (diff) |
Basic AI functionality
Diffstat (limited to 'scripts/recipes')
-rw-r--r-- | scripts/recipes/handle_recipes.py | 2 |
1 files changed, 2 insertions, 0 deletions
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 |