Skip to content

Commit

Permalink
Remove mongoose-title-case plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
cefjoeii committed Jul 23, 2017
1 parent 6fff987 commit 082abcb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions models/user.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const mongoose = require('mongoose');
const titlize = require('mongoose-title-case');
const unique = require('mongoose-unique-validator');
const validate = require('mongoose-validator');
const config = require('../config/db');
Expand Down Expand Up @@ -57,7 +56,4 @@ const UserSchema = new mongoose.Schema({
// Use the unique validator plugin
UserSchema.plugin(unique, { message: 'That {PATH} is already taken.' });

// Make the name capitalization consistent
UserSchema.plugin(titlize, { paths: ['name'], trim: false });

const User = module.exports = mongoose.model('user', UserSchema);
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "A CRUD starter kit using MongoDB, Express.js, React.js, and Node.js",
"main": "app.js",
"scripts": {
"start": "nodemon app",
"start": "nodemon server",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
Expand All @@ -23,8 +23,8 @@
"cors": "^2.8.4",
"express": "^4.15.3",
"mongoose": "4.10.8",
"mongoose-title-case": "0.0.4",
"mongoose-unique-validator": "^1.0.5",
"mongoose-validator": "^1.3.2"
"mongoose-validator": "^1.3.2",
"string-capitalize-name": "^1.0.3"
}
}

0 comments on commit 082abcb

Please sign in to comment.