Updating layout typing.

This commit is contained in:
mike12345567 2023-11-08 12:57:07 +00:00
parent e8fb43d30c
commit 935ec4c47e
2 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,7 @@
import { EMPTY_LAYOUT } from "../../constants/layouts" import { EMPTY_LAYOUT } from "../../constants/layouts"
import { generateLayoutID, getScreenParams } from "../../db/utils" import { generateLayoutID, getScreenParams } from "../../db/utils"
import { events, context } from "@budibase/backend-core" import { events, context } from "@budibase/backend-core"
import { BBContext } from "@budibase/types" import { BBContext, Layout } from "@budibase/types"
export async function save(ctx: BBContext) { export async function save(ctx: BBContext) {
const db = context.getAppDB() const db = context.getAppDB()
@ -30,7 +30,7 @@ export async function destroy(ctx: BBContext) {
layoutRev = ctx.params.layoutRev layoutRev = ctx.params.layoutRev
const layoutsUsedByScreens = ( const layoutsUsedByScreens = (
await db.allDocs<any>( await db.allDocs<Layout>(
getScreenParams(null, { getScreenParams(null, {
include_docs: true, include_docs: true,
}) })

View File

@ -2,4 +2,5 @@ import { Document } from "../document"
export interface Layout extends Document { export interface Layout extends Document {
props: any props: any
layoutId?: string
} }