refactor: migrate to objection.js + knex
This commit is contained in:
1 parent
e03e6826a8
commit
c9b643fbf0
46 files changed
+614
-502
No files matched your search
@@ -52,11 +52,7 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
async loadLocale(locale, opts = { silent: false }) {
|
||||
const res = await WIKI.db.Locale.findOne({
|
||||
where: {
|
||||
code: locale
|
||||
}
|
||||
})
|
||||
const res = await WIKI.db.locales.query().findOne('code', locale)
|
||||
if (res) {
|
||||
if (_.isPlainObject(res.strings)) {
|
||||
_.forOwn(res.strings, (data, ns) => {
|
||||
|
||||
Reference in new issue
Block a user