From aec70cba2579088d0f8a9cac2ba33030c5c17d22 Mon Sep 17 00:00:00 2001 From: Mateja Date: Thu, 29 Jul 2021 03:16:51 +0200 Subject: Save and check user ID for every order. --- server/models/Order.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/models') diff --git a/server/models/Order.js b/server/models/Order.js index a4b2508..8520abf 100644 --- a/server/models/Order.js +++ b/server/models/Order.js @@ -26,7 +26,7 @@ const OrderSchema = new mongoose.Schema({ }, userId: { type: mongoose.Schema.Types.ObjectId, - required: false + required: true }, items: { type: [ItemSchema], -- cgit v1.2.3