fix: editor locale redirect + welcome page localization

This commit is contained in:
Nick
2019-07-13 20:27:31 -04:00
parent d546695143
commit 6974811658
7 changed files with 58 additions and 14 deletions

View File

@@ -37,7 +37,7 @@ module.exports = async (localeCode) => {
const locales = await WIKI.cache.get('locales')
if (locales) {
const currentLocale = _.find(locales, ['code', localeCode]) || {}
const existingLocale = await WIKI.models.locales.query().where('code', localeCode)
const existingLocale = await WIKI.models.locales.query().where('code', localeCode).first()
if (existingLocale) {
await WIKI.models.locales.query().patch({
strings: lcObj