diff options
author | Mateja <mail@matejamaric.com> | 2021-07-11 16:37:22 +0200 |
---|---|---|
committer | Mateja <mail@matejamaric.com> | 2021-07-11 16:37:22 +0200 |
commit | 54619e571698a89727fa1112290addcf2f8c82da (patch) | |
tree | 86c5174a448c0b6a76d92d26e2ef7715f40c4129 /server/models | |
parent | 8e9922bd920814caea4670226fa8cbac2a040373 (diff) | |
download | mevn-ecommerce-54619e571698a89727fa1112290addcf2f8c82da.tar.gz mevn-ecommerce-54619e571698a89727fa1112290addcf2f8c82da.zip |
Add default image for products.
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/Product.js | 2 |
1 files changed, 1 insertions, 1 deletions
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: { |