fix
This commit is contained in:
parent
55d1d7376b
commit
fe47485e28
|
|
@ -35,7 +35,7 @@ export const _ = {
|
|||
},
|
||||
route: async () => {
|
||||
if (gz) {
|
||||
if (cache.route) return cache.route;
|
||||
if (cache.route) return await responseCompressed(req, cache.route);
|
||||
|
||||
let layout = null as null | SinglePage;
|
||||
for (const l of gz.layouts) {
|
||||
|
|
@ -43,9 +43,7 @@ export const _ = {
|
|||
if (l.is_default_layout) layout = l;
|
||||
}
|
||||
|
||||
cache.route = await responseCompressed(
|
||||
req,
|
||||
JSON.stringify({
|
||||
cache.route = JSON.stringify({
|
||||
site: { ...gz.site, api_url: (gz.site as any)?.config?.api_url },
|
||||
urls: gz.pages.map((e) => {
|
||||
return { id: e.id, url: e.url };
|
||||
|
|
@ -54,10 +52,9 @@ export const _ = {
|
|||
id: layout?.id,
|
||||
root: layout?.content_tree,
|
||||
},
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
return cache.route;
|
||||
return await responseCompressed(req, cache.route);
|
||||
}
|
||||
},
|
||||
page: async () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue