Removing ASYNC
Browse files- orders/routes.py +1 -1
orders/routes.py
CHANGED
@@ -30,7 +30,7 @@ def health_check():
|
|
30 |
|
31 |
@meal_router.post("/", response_model=MealBase, status_code=status.HTTP_201_CREATED)
|
32 |
async def meal_create(data: MealCreate, db: Session = Depends(get_db)):
|
33 |
-
new_meal =
|
34 |
id, name = new_meal.id, new_meal.name
|
35 |
return JSONResponse(
|
36 |
content={"id": id, "name": name},
|
|
|
30 |
|
31 |
@meal_router.post("/", response_model=MealBase, status_code=status.HTTP_201_CREATED)
|
32 |
async def meal_create(data: MealCreate, db: Session = Depends(get_db)):
|
33 |
+
new_meal = create_meal(db, data)
|
34 |
id, name = new_meal.id, new_meal.name
|
35 |
return JSONResponse(
|
36 |
content={"id": id, "name": name},
|