Quellcode durchsuchen

tech(notifications): remove async webhook

bergquist vor 9 Jahren
Ursprung
Commit
5bbdd99d35
2 geänderte Dateien mit 0 neuen und 21 gelöschten Zeilen
  1. 0 8
      pkg/models/notifications.go
  2. 0 13
      pkg/services/notifications/notifications.go

+ 0 - 8
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

+ 0 - 13
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 ""