mirror of
https://github.com/wassname/talk.git
synced 2026-09-09 11:38:08 +08:00
Use mongoose that already is in the repo. It changes var to const.
This commit is contained in:
+4
-4
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user