terseness

This commit is contained in:
Riley Davis
2016-11-03 11:33:32 -06:00
parent 73be4cfe28
commit c2d4e1255b
2 changed files with 10 additions and 12 deletions
+8 -2
View File
@@ -1,11 +1,17 @@
const mongoose = require('../mongoose');
const uuid = require('uuid');
const Schema = mongoose.Schema;
const SettingSchema = new Schema({
id: {type: String, default: '1'},
moderation: {type: String, enum: ['pre', 'post'], default: 'pre'},
}, {timestamps: {createdAt: 'created_at', updatedAt: 'updated_at'}});
}, {
_id: false,
timestamps: {
createdAt: 'created_at',
updatedAt: 'updated_at'
}
});
SettingSchema.statics.getSettings = function () {
return this.findOne();