diff --git a/packages/server/src/api/controllers/rowAction/crud.ts b/packages/server/src/api/controllers/rowAction/crud.ts index ca84b2ea30..71fbce16e6 100644 --- a/packages/server/src/api/controllers/rowAction/crud.ts +++ b/packages/server/src/api/controllers/rowAction/crud.ts @@ -68,26 +68,6 @@ export async function create( ctx.status = 201 } -export async function update( - ctx: Ctx -) { - const table = await getTable(ctx) - const tableId = table._id! - const { actionId } = ctx.params - - const action = await sdk.rowActions.update(tableId, actionId, { - name: ctx.request.body.name, - }) - - ctx.body = { - tableId, - id: action.id, - name: action.name, - automationId: action.automationId, - allowedSources: flattenAllowedSources(tableId, action.permissions), - } -} - export async function remove(ctx: Ctx) { const table = await getTable(ctx) const { actionId } = ctx.params diff --git a/packages/server/src/api/routes/rowAction.ts b/packages/server/src/api/routes/rowAction.ts index 3d14633509..b4b595164c 100644 --- a/packages/server/src/api/routes/rowAction.ts +++ b/packages/server/src/api/routes/rowAction.ts @@ -40,12 +40,6 @@ router rowActionValidator(), rowActionController.create ) - .put( - "/api/tables/:tableId/actions/:actionId", - authorized(BUILDER), - rowActionValidator(), - rowActionController.update - ) .delete( "/api/tables/:tableId/actions/:actionId", authorized(BUILDER), diff --git a/packages/server/src/sdk/app/rowActions.ts b/packages/server/src/sdk/app/rowActions.ts index fa72079223..f1064396fc 100644 --- a/packages/server/src/sdk/app/rowActions.ts +++ b/packages/server/src/sdk/app/rowActions.ts @@ -159,20 +159,6 @@ async function updateDoc( } } -export async function update( - tableId: string, - rowActionId: string, - rowActionData: { name: string } -) { - const newName = rowActionData.name.trim() - - return await updateDoc(tableId, rowActionId, actionsDoc => { - ensureUniqueAndThrow(actionsDoc, newName, rowActionId) - actionsDoc.actions[rowActionId].name = newName - return actionsDoc - }) -} - async function guardView(tableId: string, viewId: string) { let view if (docIds.isViewId(viewId)) {