From 8a65c002793eefc942f5e289b247fd2d3df0d01a Mon Sep 17 00:00:00 2001 From: Ronald Barendse Date: Mon, 4 Dec 2023 14:11:42 +0100 Subject: [PATCH] Fix health check webhook event registration --- .../HealthCheckCompletedWebhookEvent.cs | 2 +- ...hookEventCollectionBuilderCmsExtensions.cs | 27 ++++++++++--------- ...WebhookEventCollectionBuilderExtensions.cs | 4 +-- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/Umbraco.Core/Webhooks/Events/HealthCheck/HealthCheckCompletedWebhookEvent.cs b/src/Umbraco.Core/Webhooks/Events/HealthCheck/HealthCheckCompletedWebhookEvent.cs index 0e5fddbf39..5fd2ab413b 100644 --- a/src/Umbraco.Core/Webhooks/Events/HealthCheck/HealthCheckCompletedWebhookEvent.cs +++ b/src/Umbraco.Core/Webhooks/Events/HealthCheck/HealthCheckCompletedWebhookEvent.cs @@ -4,7 +4,7 @@ using Umbraco.Cms.Core.Notifications; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Core.Sync; -namespace Umbraco.Cms.Core.Webhooks.Events.HealthCheck; +namespace Umbraco.Cms.Core.Webhooks.Events; [WebhookEvent("Health Check Completed")] public class HealthCheckCompletedWebhookEvent : WebhookEventBase diff --git a/src/Umbraco.Core/Webhooks/WebhookEventCollectionBuilderCmsExtensions.cs b/src/Umbraco.Core/Webhooks/WebhookEventCollectionBuilderCmsExtensions.cs index 69ffddd252..e98495c866 100644 --- a/src/Umbraco.Core/Webhooks/WebhookEventCollectionBuilderCmsExtensions.cs +++ b/src/Umbraco.Core/Webhooks/WebhookEventCollectionBuilderCmsExtensions.cs @@ -1,6 +1,5 @@ using Umbraco.Cms.Core.Webhooks; using Umbraco.Cms.Core.Webhooks.Events; -using Umbraco.Cms.Core.Webhooks.Events.HealthCheck; using static Umbraco.Cms.Core.DependencyInjection.WebhookEventCollectionBuilderExtensions; namespace Umbraco.Cms.Core.DependencyInjection; @@ -180,6 +179,21 @@ public static class WebhookEventCollectionBuilderCmsExtensions return builder; } + /// + /// Adds the health check webhook events. + /// + /// The builder. + /// + /// The builder. + /// + public static WebhookEventCollectionBuilderCms AddHealthCheck(this WebhookEventCollectionBuilderCms builder) + { + builder.Builder + .Append(); + + return builder; + } + /// /// Adds the language webhook events. /// @@ -314,17 +328,6 @@ public static class WebhookEventCollectionBuilderCmsExtensions return builder; } - /// - /// Adds the healthcheck webhook events. - /// - /// The builder. - /// - /// The builder. - /// - public static WebhookEventCollectionBuilder AddHealthCheck(this WebhookEventCollectionBuilder builder) - => builder - .Append(); - /// /// Adds all available user (including password, login and user group) webhook events. /// diff --git a/src/Umbraco.Core/Webhooks/WebhookEventCollectionBuilderExtensions.cs b/src/Umbraco.Core/Webhooks/WebhookEventCollectionBuilderExtensions.cs index f5fa205832..bb7e35120b 100644 --- a/src/Umbraco.Core/Webhooks/WebhookEventCollectionBuilderExtensions.cs +++ b/src/Umbraco.Core/Webhooks/WebhookEventCollectionBuilderExtensions.cs @@ -31,6 +31,7 @@ public static class WebhookEventCollectionBuilderExtensions .AddDictionary() .AddDomain() .AddFile() + .AddHealthCheck() .AddLanguage() .AddMedia() .AddMember() @@ -38,8 +39,7 @@ public static class WebhookEventCollectionBuilderExtensions .AddPublicAccess() .AddRelation() .AddRelationType() - .AddUser() - .AddHealthCheck(); + .AddUser(); } });