Prevent double fetching on patch

This commit is contained in:
Adria Navarro 2023-09-28 11:40:58 +02:00
parent 80e979faa6
commit 7db92638de
1 changed files with 2 additions and 4 deletions

View File

@ -72,12 +72,10 @@ export async function patch(ctx: UserCtx<PatchRowRequest, PatchRowResponse>) {
id: breakRowIdField(_id),
row: dataToUpdate,
})
const row = await sdk.rows.external.getRow(tableId, _id, {
relationships: true,
})
const row = await outputProcessing(table, response.row)
return {
...response,
row: await outputProcessing(table, row),
row,
table,
}
}