sharktide commited on
Commit
cb429e9
·
verified ·
1 Parent(s): b9f6fb2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -82,7 +82,7 @@ def status():
82
  # raise HTTPException(status_code=500, detail=f"Error writing file: {str(e)}")
83
 
84
  @app.put("/add/beta")
85
- def save_json(filename: str, recipe: Recipe) -> None:
86
  # Save the data to the JSON file
87
  with JSON_DATASET_PATH.open("a") as f:
88
  # Writing the recipe details (name, ingredients, instructions) to the JSON file
@@ -92,6 +92,7 @@ def save_json(filename: str, recipe: Recipe) -> None:
92
  "instructions": recipe.instructions
93
  }, f)
94
  f.write("\n")
 
95
 
96
 
97
 
 
82
  # raise HTTPException(status_code=500, detail=f"Error writing file: {str(e)}")
83
 
84
  @app.put("/add/beta")
85
+ def save_json(filename: str, recipe: Recipe):
86
  # Save the data to the JSON file
87
  with JSON_DATASET_PATH.open("a") as f:
88
  # Writing the recipe details (name, ingredients, instructions) to the JSON file
 
92
  "instructions": recipe.instructions
93
  }, f)
94
  f.write("\n")
95
+ return {"Status": "Added to cache"}
96
 
97
 
98