瀏覽代碼

Backend now adds category to recipe on creation.

Lee Morgan 5 年之前
父節點
當前提交
cee882ac15
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      controllers/recipeData.js

+ 2 - 0
controllers/recipeData.js

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