From 8eb9d226fc490fb9e59eb2a2c745c4ef4c05e7d9 Mon Sep 17 00:00:00 2001 From: Mihir Kotbagi <68676364+Rockroyal305@users.noreply.github.com> Date: Sat, 23 Nov 2024 23:47:23 -0800 Subject: [PATCH] Default purchase quantity should be 1 --- models/purchase.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/models/purchase.js b/models/purchase.js index bf6d01ba..afad3b3a 100644 --- a/models/purchase.js +++ b/models/purchase.js @@ -32,7 +32,10 @@ const purchaseSchema = mongoose.Schema( part_name: [String], subsystem: [String], price_per_unit: [Number], - quantity: [Number], + quantity: { + type: Number, + default: 1, + }, shipping_and_handling: [Number], tax: { type: Number,