From 54619e571698a89727fa1112290addcf2f8c82da Mon Sep 17 00:00:00 2001 From: Mateja Date: Sun, 11 Jul 2021 16:37:22 +0200 Subject: Add default image for products. --- server/models/Product.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/models') diff --git a/server/models/Product.js b/server/models/Product.js index f825a8b..a8ef10e 100644 --- a/server/models/Product.js +++ b/server/models/Product.js @@ -12,7 +12,7 @@ const ProductSchema = new mongoose.Schema({ }, imagePath: { type: String, - required: false, + default: "uploads/no-image.png", maxLength: [256, "Product's image path can't have more then 256 characters."] }, price: { -- cgit v1.2.3