From 29dc36ddac729d67e7eb8808fd7c525480e7d50f Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Wed, 22 Nov 2023 14:07:45 +0000 Subject: [PATCH] Refined the DataType webhooks mostly to remove Messages & State properties --- .../Webhooks/Events/DataType/DataTypeDeletedWebhookEvent.cs | 3 +++ .../Webhooks/Events/DataType/DataTypeMovedWebhookEvent.cs | 3 +++ .../Webhooks/Events/DataType/DataTypeSavedWebhookEvent.cs | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/Umbraco.Core/Webhooks/Events/DataType/DataTypeDeletedWebhookEvent.cs b/src/Umbraco.Core/Webhooks/Events/DataType/DataTypeDeletedWebhookEvent.cs index 1de8d78a4ca5..78594954633c 100644 --- a/src/Umbraco.Core/Webhooks/Events/DataType/DataTypeDeletedWebhookEvent.cs +++ b/src/Umbraco.Core/Webhooks/Events/DataType/DataTypeDeletedWebhookEvent.cs @@ -19,4 +19,7 @@ public DataTypeDeletedWebhookEvent( } public override string Alias => "dataTypeDeleted"; + + public override object? ConvertNotificationToRequestPayload(DataTypeSavedNotification notification) + => notification.SavedEntities; } diff --git a/src/Umbraco.Core/Webhooks/Events/DataType/DataTypeMovedWebhookEvent.cs b/src/Umbraco.Core/Webhooks/Events/DataType/DataTypeMovedWebhookEvent.cs index d828c7b065b6..81b1dde31085 100644 --- a/src/Umbraco.Core/Webhooks/Events/DataType/DataTypeMovedWebhookEvent.cs +++ b/src/Umbraco.Core/Webhooks/Events/DataType/DataTypeMovedWebhookEvent.cs @@ -19,4 +19,7 @@ public DataTypeMovedWebhookEvent( } public override string Alias => "dataTypeMoved"; + + public override object? ConvertNotificationToRequestPayload(DataTypeMovedNotification notification) + => notification.MoveInfoCollection; } diff --git a/src/Umbraco.Core/Webhooks/Events/DataType/DataTypeSavedWebhookEvent.cs b/src/Umbraco.Core/Webhooks/Events/DataType/DataTypeSavedWebhookEvent.cs index 0f52a1709043..caf211893148 100644 --- a/src/Umbraco.Core/Webhooks/Events/DataType/DataTypeSavedWebhookEvent.cs +++ b/src/Umbraco.Core/Webhooks/Events/DataType/DataTypeSavedWebhookEvent.cs @@ -19,4 +19,7 @@ public DataTypeSavedWebhookEvent( } public override string Alias => "dataTypeSaved"; + + public override object? ConvertNotificationToRequestPayload(DataTypeSavedNotification notification) + => notification.SavedEntities; }