diff --git a/packages/server/src/api/controllers/row/internal.ts b/packages/server/src/api/controllers/row/internal.ts index 54d9b6a536..fe09526c33 100644 --- a/packages/server/src/api/controllers/row/internal.ts +++ b/packages/server/src/api/controllers/row/internal.ts @@ -32,7 +32,7 @@ export async function patch(ctx: UserCtx) { try { oldRow = await outputProcessing( dbTable, - await utils.findRow(ctx, tableId, inputs._id!) + await utils.findRow(tableId, inputs._id!) ) } catch (err) { if (isUserTable) { @@ -100,7 +100,7 @@ export async function find(ctx: UserCtx): Promise { const tableId = utils.getTableId(ctx), rowId = ctx.params.rowId const table = await sdk.tables.getTable(tableId) - let row = await utils.findRow(ctx, tableId, rowId) + let row = await utils.findRow(tableId, rowId) row = await outputProcessing(table, row) return row } @@ -195,7 +195,7 @@ export async function fetchEnrichedRow(ctx: UserCtx) { sdk.tables.getTable(tableId), linkRows.getLinkDocuments({ tableId, rowId, fieldName }), ]) - let row = await utils.findRow(ctx, tableId, rowId) + let row = await utils.findRow(tableId, rowId) row = await outputProcessing(table, row) const linkVals = links as LinkDocumentValue[] diff --git a/packages/server/src/api/controllers/row/utils/utils.ts b/packages/server/src/api/controllers/row/utils/utils.ts index 1a8b5c1041..911cfe8d5b 100644 --- a/packages/server/src/api/controllers/row/utils/utils.ts +++ b/packages/server/src/api/controllers/row/utils/utils.ts @@ -8,7 +8,6 @@ import { RelationshipsJson, Row, Table, - UserCtx, } from "@budibase/types" import { processDates, @@ -64,7 +63,7 @@ export async function processRelationshipFields( return row } -export async function findRow(ctx: UserCtx, tableId: string, rowId: string) { +export async function findRow(tableId: string, rowId: string) { const db = context.getAppDB() let row: Row // TODO remove special user case in future