Exemplo n.º 1
0
        public bool Webhook([FromBody] WebhookSettings settings)
        {
            try
            {
                settings.Enabled = true;
                WebhookNotification.NotifyAsync(
                    new NotificationOptions {
                    NotificationType = NotificationType.Test, RequestId = -1
                }, settings);

                return(true);
            }
            catch (Exception e)
            {
                Log.LogError(LoggingEvents.Api, e, "Could not test your webhook");
                return(false);
            }
        }