Commit 1b84bf96 authored by 郭志伟's avatar 郭志伟

fix(save): 调整保存配置

parent d6ae7d3b
...@@ -31,8 +31,8 @@ export default class EditorController extends Controller { ...@@ -31,8 +31,8 @@ export default class EditorController extends Controller {
} }
public async get(ctx: Context) { public async get(ctx: Context) {
// let pageInfo = await ctx.service.redis.get(`pageInfo:${ctx.params.uuid}`); let pageInfo = await ctx.service.redis.get(`pageInfo:${ctx.params.uuid}`);
// if (!pageInfo) { if (!pageInfo) {
let pageInfo = await ctx.model.PageInfo.findOne({where: { uuid: ctx.params.uuid }}); let pageInfo = await ctx.model.PageInfo.findOne({where: { uuid: ctx.params.uuid }});
if (ctx.query.lite && pageInfo) { if (ctx.query.lite && pageInfo) {
const page = JSON.parse(pageInfo.page || []); const page = JSON.parse(pageInfo.page || []);
...@@ -42,7 +42,7 @@ export default class EditorController extends Controller { ...@@ -42,7 +42,7 @@ export default class EditorController extends Controller {
pageInfo.page = JSON.stringify(page); pageInfo.page = JSON.stringify(page);
} }
await ctx.service.redis.set(`pageInfo:${ctx.params.uuid}`, pageInfo); await ctx.service.redis.set(`pageInfo:${ctx.params.uuid}`, pageInfo);
// } }
ctx.body = ctx.helper.ok(pageInfo); ctx.body = ctx.helper.ok(pageInfo);
} }
......
// This file is created by egg-ts-helper@1.26.0 // This file is created by egg-ts-helper@1.25.9
// Do not modify this file!!!!!!!!! // Do not modify this file!!!!!!!!!
import 'egg'; import 'egg';
......
// This file is created by egg-ts-helper@1.26.0 // This file is created by egg-ts-helper@1.25.9
// Do not modify this file!!!!!!!!! // Do not modify this file!!!!!!!!!
import 'egg'; import 'egg';
......
// This file is created by egg-ts-helper@1.26.0 // This file is created by egg-ts-helper@1.25.9
// Do not modify this file!!!!!!!!! // Do not modify this file!!!!!!!!!
import 'egg'; import 'egg';
......
// This file is created by egg-ts-helper@1.26.0 // This file is created by egg-ts-helper@1.25.9
// Do not modify this file!!!!!!!!! // Do not modify this file!!!!!!!!!
import 'egg'; import 'egg';
......
// This file is created by egg-ts-helper@1.26.0 // This file is created by egg-ts-helper@1.25.9
// Do not modify this file!!!!!!!!! // Do not modify this file!!!!!!!!!
import 'egg'; import 'egg';
......
// This file is created by egg-ts-helper@1.26.0 // This file is created by egg-ts-helper@1.25.9
// Do not modify this file!!!!!!!!! // Do not modify this file!!!!!!!!!
import 'egg'; import 'egg';
......
// This file is created by egg-ts-helper@1.26.0 // This file is created by egg-ts-helper@1.25.9
// Do not modify this file!!!!!!!!! // Do not modify this file!!!!!!!!!
import 'egg'; import 'egg';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment