feat: core improvements + local fs provider + UI fixes

This commit is contained in:
NGPixel
2018-07-29 22:23:33 -04:00
parent 803d86ff63
commit 2817c72ec3
65 changed files with 482 additions and 264 deletions

View File

@@ -52,7 +52,7 @@ module.exports = {
* Load config from DB
*/
async loadFromDb() {
let conf = await WIKI.db.settings.getConfig()
let conf = await WIKI.models.settings.getConfig()
if (conf) {
WIKI.config = _.defaultsDeep(conf, WIKI.config)
} else {
@@ -73,9 +73,9 @@ module.exports = {
if (!_.isPlainObject(value)) {
value = { v: value }
}
let affectedRows = await WIKI.db.settings.query().patch({ value }).where('key', key)
let affectedRows = await WIKI.models.settings.query().patch({ value }).where('key', key)
if (affectedRows === 0 && value) {
await WIKI.db.settings.query().insert({ key, value })
await WIKI.models.settings.query().insert({ key, value })
}
}
} catch (err) {