diff --git a/src/models/order.model.ts b/src/models/order.model.ts index 064c971..fd4cd51 100644 --- a/src/models/order.model.ts +++ b/src/models/order.model.ts @@ -43,7 +43,7 @@ const orderSchema = new Schema( { _id: { type: String, - default: uuidv4, + default: () => uuidv4(), }, userId: { type: String, diff --git a/src/models/product.model.ts b/src/models/product.model.ts index 1621642..7558208 100644 --- a/src/models/product.model.ts +++ b/src/models/product.model.ts @@ -14,7 +14,7 @@ const productSchema = new Schema( { _id: { type: String, - default: uuidv4, + default: () => uuidv4(), }, name: { type: String, diff --git a/src/models/user.model.ts b/src/models/user.model.ts index 30baf97..022bcc0 100644 --- a/src/models/user.model.ts +++ b/src/models/user.model.ts @@ -16,7 +16,7 @@ const userSchema = new Schema( { _id: { type: String, - default: uuidv4, + default: () => uuidv4(), }, email: { type: String,