From b4906b0db3c26bbc35f32afa603deed77a5b5784 Mon Sep 17 00:00:00 2001 From: melohagan <101575380+melohagan@users.noreply.github.com> Date: Thu, 29 Feb 2024 16:45:40 +0000 Subject: [PATCH] Fetch attachment URL in public API retrieve row (#13167) --- packages/server/src/api/controllers/row/internal.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/server/src/api/controllers/row/internal.ts b/packages/server/src/api/controllers/row/internal.ts index 3ee08fff2e..cc903bd74a 100644 --- a/packages/server/src/api/controllers/row/internal.ts +++ b/packages/server/src/api/controllers/row/internal.ts @@ -189,11 +189,12 @@ export async function fetchEnrichedRow(ctx: UserCtx) { const tableId = utils.getTableId(ctx) const rowId = ctx.params.rowId as string // need table to work out where links go in row, as well as the link docs - const [table, row, links] = await Promise.all([ + const [table, links] = await Promise.all([ sdk.tables.getTable(tableId), - utils.findRow(ctx, tableId, rowId), linkRows.getLinkDocuments({ tableId, rowId, fieldName }), ]) + let row = await utils.findRow(ctx, tableId, rowId) + row = await outputProcessing(table, row) const linkVals = links as LinkDocumentValue[] // look up the actual rows based on the ids