x
This commit is contained in:
1 parent
158fa1ac22
commit
037ee775db
1 file changed
+2
-10
@@ -396,10 +396,6 @@ export const backupRoute = new Elysia({ prefix: "/backup" })
|
||||
const settings = await prisma.storeSettings.findFirst({
|
||||
include: { translations: true },
|
||||
});
|
||||
const footerMenus = await prisma.footerMenu.findMany({
|
||||
include: { items: true },
|
||||
orderBy: { id: "asc" },
|
||||
}).catch(() => []); // graceful if table not present
|
||||
|
||||
return jsonResponse(
|
||||
{
|
||||
@@ -410,7 +406,7 @@ export const backupRoute = new Elysia({ prefix: "/backup" })
|
||||
articles: articles.length,
|
||||
hasSettings: !!settings,
|
||||
},
|
||||
data: { pages, menus, footerMenus, articles, settings },
|
||||
data: { pages, menus, articles, settings },
|
||||
},
|
||||
`homaroma_cms_all_${dt}.json`
|
||||
);
|
||||
@@ -421,12 +417,8 @@ export const backupRoute = new Elysia({ prefix: "/backup" })
|
||||
include: { items: { include: { translations: true } } },
|
||||
orderBy: { id: "asc" },
|
||||
});
|
||||
const footerMenus = await prisma.footerMenu.findMany({
|
||||
include: { items: true },
|
||||
orderBy: { id: "asc" },
|
||||
}).catch(() => []);
|
||||
return jsonResponse(
|
||||
{ exportedAt: new Date().toISOString(), data: { menus, footerMenus } },
|
||||
{ exportedAt: new Date().toISOString(), data: { menus } },
|
||||
`homaroma_cms_menus_${dt}.json`
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user