feat: config-manager component
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
'use strict'
|
||||
|
||||
/* global wiki */
|
||||
|
||||
const _ = require('lodash')
|
||||
|
@@ -1,5 +1,3 @@
|
||||
'use strict'
|
||||
|
||||
/* global wiki */
|
||||
|
||||
const fs = require('fs')
|
||||
@@ -9,8 +7,6 @@ const path = require('path')
|
||||
const cfgHelper = require('../helpers/config')
|
||||
|
||||
module.exports = {
|
||||
SUBSETS: ['auth', 'features', 'git', 'logging', 'site', 'theme', 'uploads'],
|
||||
|
||||
/**
|
||||
* Load root config from disk
|
||||
*/
|
||||
@@ -64,7 +60,7 @@ module.exports = {
|
||||
*/
|
||||
loadFromDb(subsets) {
|
||||
if (!_.isArray(subsets) || subsets.length === 0) {
|
||||
subsets = this.SUBSETS
|
||||
subsets = wiki.data.configNamespaces
|
||||
}
|
||||
|
||||
return wiki.db.Setting.findAll({
|
||||
|
@@ -110,7 +110,7 @@ module.exports = {
|
||||
// -> Sync DB Schemas
|
||||
syncSchemas() {
|
||||
return self.inst.sync({
|
||||
force: true,
|
||||
force: false,
|
||||
logging: log => { wiki.logger.log('verbose', log) }
|
||||
})
|
||||
},
|
||||
|
Reference in New Issue
Block a user