mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
tech(notifications): remove async webhook
This commit is contained in:
parent
66f257e382
commit
5bbdd99d35
@ -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
|
||||||
|
@ -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 ""
|
||||||
|
Loading…
Reference in New Issue
Block a user