fix: navigation save cache error #780

This commit is contained in:
Nick
2019-03-23 18:40:53 -04:00
parent 81ff24b9b6
commit 2a950575e2
2 changed files with 22 additions and 11 deletions

View File

@@ -1,4 +1,3 @@
const _ = require('lodash')
const graphHelper = require('../../helpers/graph')
/* global WIKI */
@@ -21,7 +20,7 @@ module.exports = {
await WIKI.models.navigation.query().patch({
config: args.tree
}).where('key', 'site')
await WIKI.redis.set('nav:sidebar', JSON.stringify(args.tree), 'EX', 300)
await WIKI.cache.set('nav:sidebar', args.tree, 300)
return {
responseResult: graphHelper.generateSuccess('Navigation updated successfully')