This commit is contained in:
+6
-4
@@ -351,9 +351,9 @@ impl MealService {
|
||||
let meals = Arc::clone(&self.meals);
|
||||
self.db
|
||||
.run(move |txn| {
|
||||
Box::pin(async move {
|
||||
meals.create_meal(txn, name, description, category_id).await
|
||||
})
|
||||
Box::pin(
|
||||
async move { meals.create_meal(txn, name, description, category_id).await },
|
||||
)
|
||||
})
|
||||
.await
|
||||
}
|
||||
@@ -411,7 +411,9 @@ impl MealService {
|
||||
let meal_categories = Arc::clone(&self.meal_categories);
|
||||
self.db
|
||||
.run(move |txn| {
|
||||
Box::pin(async move { meal_categories.delete_meal_category(txn, category_id).await })
|
||||
Box::pin(
|
||||
async move { meal_categories.delete_meal_category(txn, category_id).await },
|
||||
)
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user