aboutsummaryrefslogtreecommitdiff
path: root/scripts/recipes
diff options
context:
space:
mode:
authorJJ <nicetry@noemail.com>2025-03-31 21:08:41 +0100
committerJJ <nicetry@noemail.com>2025-03-31 21:08:41 +0100
commit2e0b9c97af457da5c6afda611d48e59047d4cdb8 (patch)
tree199d10037f790bcade2ac86f478c10da77bbc771 /scripts/recipes
parent17529f38f4b4edf7249e18418ddfcc3f818a006d (diff)
Basic AI functionality
Diffstat (limited to 'scripts/recipes')
-rw-r--r--scripts/recipes/handle_recipes.py2
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