From 1d13b49e866a193c241ade358fa10bcb701c07ec Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 31 Jul 2023 14:16:38 +0200 Subject: [PATCH] Fix middleware usage --- packages/server/src/api/routes/row.ts | 6 +++--- packages/server/src/api/routes/tests/row.spec.ts | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/server/src/api/routes/row.ts b/packages/server/src/api/routes/row.ts index 5d9a2d1df8..e530c3165b 100644 --- a/packages/server/src/api/routes/row.ts +++ b/packages/server/src/api/routes/row.ts @@ -176,7 +176,7 @@ router "/api/:tableId/rows", paramResource("tableId"), authorized(PermissionType.TABLE, PermissionLevel.WRITE), - noViewData(), + noViewData, rowController.save ) /** @@ -191,7 +191,7 @@ router "/api/:tableId/rows", paramResource("tableId"), authorized(PermissionType.TABLE, PermissionLevel.WRITE), - noViewData(), + noViewData, rowController.patch ) /** @@ -302,7 +302,7 @@ router "/api/v2/views/:viewId/rows", paramResource("viewId"), authorized(PermissionType.VIEW, PermissionLevel.WRITE), - trimViewRowInfo(), + trimViewRowInfo, rowController.save ) diff --git a/packages/server/src/api/routes/tests/row.spec.ts b/packages/server/src/api/routes/tests/row.spec.ts index ad521967b0..7705e84b47 100644 --- a/packages/server/src/api/routes/tests/row.spec.ts +++ b/packages/server/src/api/routes/tests/row.spec.ts @@ -16,7 +16,6 @@ import { FieldType, SortType, SortOrder, - PatchRowRequest, } from "@budibase/types" import { expectAnyInternalColsAttributes,