mirror of
https://github.com/wassname/talk.git
synced 2026-08-09 12:30:42 +08:00
terseness
This commit is contained in:
+8
-2
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user