Use mongoose that already is in the repo. It changes var to const.

This commit is contained in:
gaba
2016-11-01 13:50:04 -07:00
parent d80b3bc27f
commit 4ec6da6ed7
3 changed files with 14 additions and 14 deletions
+4 -4
View File
@@ -1,14 +1,14 @@
'use strict';
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
const mongoose = require('../mongoose');
const Schema = mongoose.Schema;
var userSchema = new Schema({
const userSchema = new Schema({
name: String,
created_at: { type: Date, default: Date.now },
updated_at: { type: Date, default: Date.now }
});
var User = mongoose.model('User', userSchema);
const User = mongoose.model('User', userSchema);
module.exports = User;