From f7ab174efa5b4aa9984208a0079ae36b7276ef6b Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Fri, 24 Nov 2023 10:01:36 +0100 Subject: [PATCH] use unique --- .../copy/data-type-copy.server.data-source.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/data-type/repository/copy/data-type-copy.server.data-source.ts b/src/Umbraco.Web.UI.Client/src/packages/core/data-type/repository/copy/data-type-copy.server.data-source.ts index 3886f8dc30..5fb3eb8875 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/data-type/repository/copy/data-type-copy.server.data-source.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/data-type/repository/copy/data-type-copy.server.data-source.ts @@ -21,23 +21,23 @@ export class UmbDataTypeCopyServerDataSource implements UmbCopyDataSource { } /** - * Copy an item for the given id to the target id - * @param {Array} id + * Copy an item for the given unique to the target unique + * @param {Array} unique * @return {*} * @memberof UmbDataTypeCopyServerDataSource */ - async copy(id: string, targetId: string | null) { - if (!id) throw new Error('Id is missing'); - if (targetId === undefined) throw new Error('Target Id is missing'); + async copy(unique: string, targetUnique: string | null) { + if (!unique) throw new Error('Unique is missing'); + if (targetUnique === undefined) throw new Error('Target unique is missing'); return tryExecuteAndNotify( this.#host, DataTypeResource.postDataTypeByIdCopy({ - id, + id: unique, requestBody: { - targetId, + targetId: targetUnique, }, - }) + }), ); } }