Skip to content

Commit

Permalink
updated mongoose version to 3.8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
alabid committed Oct 30, 2014
1 parent 0e44fd8 commit cd8186c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions models.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ User.virtual("userName").set(function(userName) {
// ii) Document
// iii) DocPrivilege
// iv) Message
mongoose.model("User", User);
mongoose.model("Document", Document);
mongoose.model("DocPrivilege", DocPrivilege);
mongoose.model("Message", Message);
module.exports = function() {
mongoose.model("User", User);
mongoose.model("Document", Document);
mongoose.model("DocPrivilege", DocPrivilege);
mongoose.model("Message", Message);
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
, "dependencies": {
"express" : "2.5.x"
, "mongoose" : "2.6.x"
, "mongoose" : "3.8.x"
, "share" : "0.6.x"
, "socket.io" : "0.9.x"
, "temp" : "0.4.x"
Expand Down
2 changes: 1 addition & 1 deletion routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ io.set('log level', 1); // reduce logging
mongoose.connect(configs.db.url);

// import the models
require("./models");
require("./models")();
var User = mongoose.model("User")
, Document = mongoose.model("Document")
, DocPrivilege = mongoose.model("DocPrivilege")
Expand Down

0 comments on commit cd8186c

Please sign in to comment.