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
@@ -38,7 +38,8 @@ module.exports = async (job) => {
|
||||
const locales = await WIKI.redis.get('locales')
|
||||
if (locales) {
|
||||
const currentLocale = _.find(JSON.parse(locales), ['code', job.data.locale]) || {}
|
||||
await WIKI.db.Locale.upsert({
|
||||
await WIKI.db.locales.query().delete().where('code', job.data.locale)
|
||||
await WIKI.db.locales.query().insert({
|
||||
code: job.data.locale,
|
||||
strings: lcObj,
|
||||
isRTL: currentLocale.isRTL,
|
||||
|
||||
Reference in new issue
Block a user