From 3d57a64bab7b371433710f9a210a41e839360b2d Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 22 Jul 2024 18:06:07 +0200 Subject: [PATCH] Remove unnecessary spreads --- packages/server/src/sdk/app/automations/crud.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/src/sdk/app/automations/crud.ts b/packages/server/src/sdk/app/automations/crud.ts index 02cbbe9695..c376df8e61 100644 --- a/packages/server/src/sdk/app/automations/crud.ts +++ b/packages/server/src/sdk/app/automations/crud.ts @@ -94,7 +94,7 @@ export async function get(automationId: string) { } export async function create(automation: Automation) { - automation = trimUnexpectedObjectFields({ ...automation }) + automation = trimUnexpectedObjectFields(automation) const db = getDb() // Respect existing IDs if recreating a deleted automation @@ -119,7 +119,7 @@ export async function create(automation: Automation) { } export async function update(automation: Automation) { - automation = trimUnexpectedObjectFields({ ...automation }) + automation = trimUnexpectedObjectFields(automation) if (!automation._id || !automation._rev) { throw new HTTPError("_id or _rev fields missing", 400) }