Explorar el Código

Backend now adds category to recipe on creation.

Lee Morgan hace 5 años
padre
commit
cee882ac15
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      controllers/recipeData.js

+ 2 - 0
controllers/recipeData.js

@@ -12,6 +12,7 @@ module.exports = {
     req.body = {
     req.body = {
         name: name of recipe,
         name: name of recipe,
         price: price of the recipe,
         price: price of the recipe,
+        category: String
         ingredients: [{
         ingredients: [{
             id: id of ingredient,
             id: id of ingredient,
             quantity: quantity of ingredient in recipe
             quantity: quantity of ingredient in recipe
@@ -24,6 +25,7 @@ module.exports = {
             merchant: res.locals.merchant._id,
             merchant: res.locals.merchant._id,
             name: req.body.name,
             name: req.body.name,
             price: req.body.price,
             price: req.body.price,
+            category: req.body.category,
             ingredients: req.body.ingredients
             ingredients: req.body.ingredients
         });
         });