old_contents: var mongoose = require('mongoose');
  var Schema = mongoose.Schema;
  
  var User = new Schema({
  		firstname: String,
  		lastname: String,
  		mail: {
  			type: String,
  			index: true,
  			unique: true
  		},
  		password: String
  });
  
  module.exports = mongoose.model('User', User);
new_contents: var mongoose = require('mongoose');
  var Schema = mongoose.Schema;
  
  var User = new Schema({
  		firstname: String,
  		lastname: String,
  		mail: {
  			type: String,
  			unique: true
  		},
  		password: String
  });
  
  module.exports = mongoose.model('User', User);
subject: update unique user