Remove unnecessary spreads

This commit is contained in:
Adria Navarro 2024-07-22 18:06:07 +02:00
parent 5c41b372f3
commit 3d57a64bab
1 changed files with 2 additions and 2 deletions

View File

@ -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)
}