diff --git a/packages/frontend-core/src/api/layouts.ts b/packages/frontend-core/src/api/layouts.ts index 159b6585fe..233f60e6c2 100644 --- a/packages/frontend-core/src/api/layouts.ts +++ b/packages/frontend-core/src/api/layouts.ts @@ -1,9 +1,13 @@ -import { Layout, SaveLayoutRequest, SaveLayoutResponse } from "@budibase/types" +import { + DeleteLayoutResponse, + SaveLayoutRequest, + SaveLayoutResponse, +} from "@budibase/types" import { BaseAPIClient } from "./types" export interface LayoutEndpoints { - saveLayout: (layout: Layout) => Promise - deleteLayout: (id: string, rev: string) => Promise<{ message: string }> + saveLayout: (layout: SaveLayoutRequest) => Promise + deleteLayout: (id: string, rev: string) => Promise } export const buildLayoutEndpoints = (API: BaseAPIClient): LayoutEndpoints => ({ @@ -12,7 +16,7 @@ export const buildLayoutEndpoints = (API: BaseAPIClient): LayoutEndpoints => ({ * @param layout the layout to save */ saveLayout: async layout => { - return await API.post({ + return await API.post({ url: "/api/layouts", body: layout, })