From 21ae65e20424391c3de984967b8f941a09f6e765 Mon Sep 17 00:00:00 2001 From: Quentin Vieillard Date: Sat, 18 Feb 2017 18:52:25 +0100 Subject: [PATCH 1/3] Update models.js --- common/models.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/models.js b/common/models.js index a6bdf4f..94f3dfb 100644 --- a/common/models.js +++ b/common/models.js @@ -18,4 +18,4 @@ module.exports = { cQuantity: { type: Number }, cStatus : { type: Boolean, default: false } } -}; +} From 626262a445eb0ee2a260767d7548696e52b8b41d Mon Sep 17 00:00:00 2001 From: Quentin Vieillard Date: Sat, 18 Feb 2017 19:47:12 +0100 Subject: [PATCH 2/3] Update models.js --- common/models.js | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/common/models.js b/common/models.js index 94f3dfb..6d79093 100644 --- a/common/models.js +++ b/common/models.js @@ -1,21 +1,21 @@ module.exports = { - user: { - name: { type: String, required: true }, - password: { type: String, required: true } - }, - commodity: { - name: String, - price: Number, - imgSrc: String - }, - cart:{ - uId: { type: String }, - cId: { type: String }, - cName: { type: String }, - cPrice: { type: String }, - cImgSrc: { type:String } , - cQuantity: { type: Number }, - cStatus : { type: Boolean, default: false } - } + user: { + name: { type: String, required: true }, + password: { type: String, required: true } + }, + commodity: { + name: String, + price: Number, + imgSrc: String + }, + cart:{ + uId: { type: String }, + cId: { type: String }, + cName: { type: String }, + cPrice: { type: String }, + cImgSrc: { type:String } , + cQuantity: { type: Number }, + cStatus : { type: Boolean, default: false } + } } From 2701eff5437453bbb06a10f1da95392ff0ec91c1 Mon Sep 17 00:00:00 2001 From: Quentin Vieillard Date: Wed, 8 Mar 2017 14:20:16 +0100 Subject: [PATCH 3/3] Update dbHelper.js --- common/dbHelper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/dbHelper.js b/common/dbHelper.js index dcd740c..f6c008d 100644 --- a/common/dbHelper.js +++ b/common/dbHelper.js @@ -2,7 +2,7 @@ Schema = mongoose.Schema, models = require('./models'); -for (var m in models) { +for(var m in models) { mongoose.model(m, new Schema(models[m])); } module.exports = {