diff --git a/packages/server/src/api/controllers/row/index.ts b/packages/server/src/api/controllers/row/index.ts index 7183aa6cd7..c217f06ad4 100644 --- a/packages/server/src/api/controllers/row/index.ts +++ b/packages/server/src/api/controllers/row/index.ts @@ -102,7 +102,7 @@ export async function find(ctx: any) { export async function destroy(ctx: UserCtx) { const appId = ctx.appId - const inputs: DeleteRowRequest = ctx.request.body + const inputs = ctx.request.body const tableId = utils.getTableId(ctx) let response, row diff --git a/packages/types/src/api/web/app/index.ts b/packages/types/src/api/web/app/index.ts index 9be15ecfe3..0b878f38de 100644 --- a/packages/types/src/api/web/app/index.ts +++ b/packages/types/src/api/web/app/index.ts @@ -1,2 +1,3 @@ export * from "./backup" export * from "./datasource" +export * from "./row" diff --git a/packages/types/src/api/web/app/row.ts b/packages/types/src/api/web/app/row.ts new file mode 100644 index 0000000000..f9623a3daf --- /dev/null +++ b/packages/types/src/api/web/app/row.ts @@ -0,0 +1,11 @@ +import { Row } from "../../../documents/app/row" + +export interface DeleteRows { + rows: (Row | string)[] +} + +export interface DeleteRow { + _id: string +} + +export type DeleteRowRequest = DeleteRows | DeleteRow diff --git a/packages/types/src/documents/app/row.ts b/packages/types/src/documents/app/row.ts index 3a302589cc..a2295c4a42 100644 --- a/packages/types/src/documents/app/row.ts +++ b/packages/types/src/documents/app/row.ts @@ -32,13 +32,3 @@ export interface Row extends Document { tableId?: string [key: string]: any } - -export interface DeleteRows { - rows: (Row | string)[] -} - -export interface DeleteRow { - _id: string -} - -export type DeleteRowRequest = DeleteRows | DeleteRow