def set_meal_plan(data: MealPlan, session: Session = Depends(generate_session)): """ Creates a meal plan database entry """ data.process_meals(session) data.save_to_db(session) return SnackResponse.success("Mealplan Created")
def set_meal_plan(data: MealPlan): """ Creates a meal plan database entry """ data.process_meals() data.save_to_db() # raise HTTPException( # status_code=404, # detail=SnackResponse.error("Unable to Create Mealplan See Log"), # ) return SnackResponse.success("Mealplan Created")