浏览代码

tech(notifications): remove async webhook

bergquist 9 年之前
父节点
当前提交
5bbdd99d35
共有 2 个文件被更改,包括 0 次插入21 次删除
  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
 	SendEmailCommand
 }
 }
 
 
-type SendWebhook struct {
-	Url        string
-	User       string
-	Password   string
-	Body       string
-	HttpMethod string
-}
-
 type SendWebhookSync struct {
 type SendWebhookSync struct {
 	Url        string
 	Url        string
 	User       string
 	User       string

+ 0 - 13
pkg/services/notifications/notifications.go

@@ -31,7 +31,6 @@ func Init() error {
 
 
 	bus.AddCtxHandler("email", sendEmailCommandHandlerSync)
 	bus.AddCtxHandler("email", sendEmailCommandHandlerSync)
 
 
-	bus.AddHandler("webhook", sendWebhook)
 	bus.AddCtxHandler("webhook", SendWebhookSync)
 	bus.AddCtxHandler("webhook", SendWebhookSync)
 
 
 	bus.AddEventListener(signUpStartedHandler)
 	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 {
 func subjectTemplateFunc(obj map[string]interface{}, value string) string {
 	obj["value"] = value
 	obj["value"] = value
 	return ""
 	return ""