From ebee98133b2f8de3b269f1da7a3051063958f26a Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 8 Mar 2022 18:00:49 +0000 Subject: [PATCH] Fixing an inconsistency that was raised by a community member. --- packages/server/src/api/controllers/row/external.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/server/src/api/controllers/row/external.js b/packages/server/src/api/controllers/row/external.js index b7c7a2bc6e..aebcfce724 100644 --- a/packages/server/src/api/controllers/row/external.js +++ b/packages/server/src/api/controllers/row/external.js @@ -33,11 +33,11 @@ exports.handleRequest = handleRequest exports.patch = async ctx => { const inputs = ctx.request.body const tableId = ctx.params.tableId - const id = breakRowIdField(inputs._id) + const id = inputs._id // don't save the ID to db delete inputs._id return handleRequest(DataSourceOperation.UPDATE, tableId, { - id, + id: breakRowIdField(id), row: inputs, }) } @@ -67,7 +67,7 @@ exports.find = async ctx => { const id = ctx.params.rowId const tableId = ctx.params.tableId const response = await handleRequest(DataSourceOperation.READ, tableId, { - id, + id: breakRowIdField(id), }) return response ? response[0] : response } @@ -76,7 +76,7 @@ exports.destroy = async ctx => { const tableId = ctx.params.tableId const id = ctx.request.body._id const { row } = await handleRequest(DataSourceOperation.DELETE, tableId, { - id, + id: breakRowIdField(id), }) return { response: { ok: true }, row } }