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
+6 -6
View File
@@ -1,11 +1,11 @@
'use strict';
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var User = require('user');
var Asset = require('asset');
const mongoose = require('../mongoose');
const Schema = mongoose.Schema;
const User = require('user');
const Asset = require('asset');
var commentSchema = new Schema({
const commentSchema = new Schema({
content: {
type: String,
required: [true, 'The content is required.'],
@@ -27,6 +27,6 @@ var commentSchema = new Schema({
updated_at: { type: Date, default: Date.now }
});
var Comment = mongoose.model('Comment', commentSchema);
const Comment = mongoose.model('Comment', commentSchema);
module.exports = Comment;