From 5bbdd99d35e56f503250925c4f38010bcf756077 Mon Sep 17 00:00:00 2001 From: bergquist Date: Tue, 8 Nov 2016 08:06:42 +0100 Subject: [PATCH] tech(notifications): remove async webhook --- pkg/models/notifications.go | 8 -------- pkg/services/notifications/notifications.go | 13 ------------- 2 files changed, 21 deletions(-) diff --git a/pkg/models/notifications.go b/pkg/models/notifications.go index 80803b3be08..c43024da691 100644 --- a/pkg/models/notifications.go +++ b/pkg/models/notifications.go @@ -16,14 +16,6 @@ type SendEmailCommandSync struct { SendEmailCommand } -type SendWebhook struct { - Url string - User string - Password string - Body string - HttpMethod string -} - type SendWebhookSync struct { Url string User string diff --git a/pkg/services/notifications/notifications.go b/pkg/services/notifications/notifications.go index 8a13eec2dc8..85bda1643d1 100644 --- a/pkg/services/notifications/notifications.go +++ b/pkg/services/notifications/notifications.go @@ -31,7 +31,6 @@ func Init() error { bus.AddCtxHandler("email", sendEmailCommandHandlerSync) - bus.AddHandler("webhook", sendWebhook) bus.AddCtxHandler("webhook", SendWebhookSync) bus.AddEventListener(signUpStartedHandler) @@ -69,18 +68,6 @@ func SendWebhookSync(ctx context.Context, cmd *m.SendWebhookSync) error { }) } -func sendWebhook(cmd *m.SendWebhook) error { - addToWebhookQueue(&Webhook{ - Url: cmd.Url, - User: cmd.User, - Password: cmd.Password, - Body: cmd.Body, - HttpMethod: cmd.HttpMethod, - }) - - return nil -} - func subjectTemplateFunc(obj map[string]interface{}, value string) string { obj["value"] = value return ""