var mongoose = require('mongoose');

var user = new mongoose.Schema({
	name: { type: String, unique: true },
	sub: { type: String, unique: true },
	ip: { type: String, unique: true }
}, {
	timestamps: true
});

user.plugin(require('mongoose-bcrypt'));

module.exports = mongoose.model('User', user);

@@ -68,12 +68,13 @@
 (%7B%0A%09
-name
+email
 : %7B 
@@ -160,30 +160,16 @@
 : String
-, unique: true
  %7D%0A%7D, %7B%0A

Change name to email