Updating layout typing.
This commit is contained in:
parent
e8fb43d30c
commit
935ec4c47e
|
@ -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,
|
||||||
})
|
})
|
||||||
|
|
|
@ -2,4 +2,5 @@ import { Document } from "../document"
|
||||||
|
|
||||||
export interface Layout extends Document {
|
export interface Layout extends Document {
|
||||||
props: any
|
props: any
|
||||||
|
layoutId?: string
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue