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:
Wyatt Johnson
2017-01-24 12:10:32 -07:00
parent 0994023864
commit a7e9c0c776
54 changed files with 1831 additions and 2499 deletions
+9 -2
View File
@@ -1,7 +1,14 @@
const Setting = require('./models/setting');
const SettingsService = require('./services/settings');
module.exports = () => Promise.all([
// Upsert the settings object.
Setting.init({id: '1', moderation: 'pre', wordlist: {banned: [], suspect: []}})
SettingsService.init({
id: '1',
moderation: 'pre',
wordlist: {
banned: [],
suspect: []
}
})
]);