mirror of
https://github.com/wassname/talk.git
synced 2026-09-09 11:38:08 +08:00
Const, service, and model updates
- Updated enum values to be uppercase - Updated services to expose service models - Updated models to only export the mongoose model - Moved all mongoose static methods over to new services - Updated tests to refelct new setup BREAKING - Status that were uppercased (caps) have caused issues with the admin pages
This commit is contained in:
+3
-3
@@ -6,7 +6,7 @@
|
||||
|
||||
const program = require('commander');
|
||||
const mongoose = require('../services/mongoose');
|
||||
const Setting = require('../models/setting');
|
||||
const SettingsService = require('../services/settings');
|
||||
const util = require('../util');
|
||||
|
||||
// Register the shutdown criteria.
|
||||
@@ -24,8 +24,8 @@ program
|
||||
.action(() => {
|
||||
const defaults = {id: '1', moderation: 'pre'};
|
||||
|
||||
Setting
|
||||
.update({id: '1'}, {$setOnInsert: defaults}, {upsert: true})
|
||||
SettingsService
|
||||
.init(defaults)
|
||||
.then(() => {
|
||||
console.log('Created settings object.');
|
||||
util.shutdown();
|
||||
|
||||
Reference in New Issue
Block a user