back to Mongo Atlas | price -> prices

This commit is contained in:
2020-11-07 11:23:23 +01:00
parent 05f9e17d64
commit 18f3dd3fdb
4 changed files with 33 additions and 22 deletions

View File

@@ -131,7 +131,7 @@ async function createDish(dish, restaurantId, oldDish) {
restaurantId: restaurantId,
name: sanitizer.sanitize.keepUnicode(dish.name),
category: dish.category,
price: dish.price,
prices: dish.prices,
notes: sanitizer.sanitize.keepUnicode(dish.notes),
imgUrl: img,
weight: dish.weight,
@@ -149,7 +149,7 @@ async function createDish(dish, restaurantId, oldDish) {
restaurantId: oldDish.restaurantId,
name: sanitizer.sanitize.keepUnicode(dish.name),
category: dish.category,
price: dish.price,
prices: dish.prices,
notes: sanitizer.sanitize.keepUnicode(dish.notes),
imgUrl: img,
weight: dish.weight,
@@ -164,7 +164,7 @@ async function createDish(dish, restaurantId, oldDish) {
}
} catch (e) {
console.log(e);
throw newError("Cannot create dish", 500);
throw newError("Cannot create dish because: " + e, 500);
}
}