Explorar o código

Add hidden field to backend recipe model.

Lee Morgan %!s(int64=5) %!d(string=hai) anos
pai
achega
e895e493ab
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      models/recipe.js

+ 4 - 0
models/recipe.js

@@ -23,6 +23,10 @@ const RecipeSchema = new mongoose.Schema({
         min: [0, "PRICE OF RECIPE CANNOT BE A NEGATIVE NUMBER"],
         required: [true, "RECIPE PRICE IS REQUIRED"]
     },
+    hidden: {
+        type: Boolean,
+        default: false
+    },
     ingredients: [{
         ingredient: {
             type: mongoose.Schema.Types.ObjectId,