Clean unnecessary ctx
This commit is contained in:
parent
89173be9f4
commit
66a2b29ca2
|
@ -32,7 +32,7 @@ export async function patch(ctx: UserCtx<PatchRowRequest, PatchRowResponse>) {
|
|||
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<Row> {
|
|||
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[]
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue