diff --git a/packages/server/src/api/controllers/layout.ts b/packages/server/src/api/controllers/layout.ts index 2a359592c7..69e4ad91ed 100644 --- a/packages/server/src/api/controllers/layout.ts +++ b/packages/server/src/api/controllers/layout.ts @@ -1,7 +1,7 @@ import { EMPTY_LAYOUT } from "../../constants/layouts" import { generateLayoutID, getScreenParams } from "../../db/utils" import { events, context } from "@budibase/backend-core" -import { BBContext } from "@budibase/types" +import { BBContext, Layout } from "@budibase/types" export async function save(ctx: BBContext) { const db = context.getAppDB() @@ -30,7 +30,7 @@ export async function destroy(ctx: BBContext) { layoutRev = ctx.params.layoutRev const layoutsUsedByScreens = ( - await db.allDocs( + await db.allDocs( getScreenParams(null, { include_docs: true, }) diff --git a/packages/types/src/documents/app/layout.ts b/packages/types/src/documents/app/layout.ts index db046e3d92..06542f680d 100644 --- a/packages/types/src/documents/app/layout.ts +++ b/packages/types/src/documents/app/layout.ts @@ -2,4 +2,5 @@ import { Document } from "../document" export interface Layout extends Document { props: any + layoutId?: string }