From a5c73892069398d3ad90e57e332bba43ffb4d4ea Mon Sep 17 00:00:00 2001 From: NGPixel Date: Thu, 10 Aug 2017 21:00:18 -0400 Subject: [PATCH] fix: hotfix 1.0.6 --- .build/_tasks.js | 2 +- server/libs/config.js | 2 +- server/libs/entries.js | 9 ++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.build/_tasks.js b/.build/_tasks.js index df862224..e5160a6c 100644 --- a/.build/_tasks.js +++ b/.build/_tasks.js @@ -76,7 +76,7 @@ module.exports = Promise.mapSeries([ return Promise.map(langs, lang => { console.info(colors.white(' ' + lang + '.json')) let outputPath = path.join('./assets/js/i18n', lang + '.json') - return fs.readJsonAsync(path.join('./server/locales', lang + '.json'), 'utf8').then((content) => { + return fs.readJsonAsync(path.join('./server/locales', lang + 'browser.json'), 'utf8').then((content) => { return fs.outputJsonAsync(outputPath, _.defaultsDeep(content, enContent)) }).catch(err => { // eslint-disable-line handle-callback-err return fs.outputJsonAsync(outputPath, enContent) diff --git a/server/libs/config.js b/server/libs/config.js index 20a2272c..92eac339 100644 --- a/server/libs/config.js +++ b/server/libs/config.js @@ -53,7 +53,7 @@ module.exports = (confPaths) => { appconfig.authStrategies = { list: _.filter(appconfig.auth, ['enabled', true]), - socialEnabled: (_.chain(appconfig.auth).omit('local').filter(['enabled', true]).value().length > 0) + socialEnabled: (_.chain(appconfig.auth).omit(['local', 'ldap']).filter(['enabled', true]).value().length > 0) } if (appconfig.authStrategies.list.length < 1) { console.error(new Error('You must enable at least 1 authentication strategy!')) diff --git a/server/libs/entries.js b/server/libs/entries.js index e4aa79be..a5e7b830 100644 --- a/server/libs/entries.js +++ b/server/libs/entries.js @@ -378,9 +378,12 @@ module.exports = { // Create cache for new entry - return self.updateCache(newEntryPath).then(entry => { - return search.add(entry) - }) + return Promise.join( + db.Entry.deleteOne({ _id: entryPath }), + self.updateCache(newEntryPath).then(entry => { + return search.add(entry) + }) + ) }) }) },