chore: move notifications models into notifications service (#61638)

This commit is contained in:
Kristin Laemmert
2023-01-17 14:47:31 -05:00
committed by GitHub
parent 8c826cd785
commit f6e3252c00
31 changed files with 110 additions and 113 deletions
+2 -2
View File
@@ -161,7 +161,7 @@ func (dn *DiscordNotifier) Notify(evalContext *alerting.EvalContext) error {
json, _ := bodyJSON.MarshalJSON()
cmd := &models.SendWebhookSync{
cmd := &notifications.SendWebhookSync{
Url: dn.WebhookURL,
HttpMethod: "POST",
ContentType: "application/json",
@@ -185,7 +185,7 @@ func (dn *DiscordNotifier) Notify(evalContext *alerting.EvalContext) error {
return nil
}
func (dn *DiscordNotifier) embedImage(cmd *models.SendWebhookSync, imagePath string, existingJSONBody []byte) error {
func (dn *DiscordNotifier) embedImage(cmd *notifications.SendWebhookSync, imagePath string, existingJSONBody []byte) error {
// nolint:gosec
// We can ignore the gosec G304 warning on this one because `imagePath` comes
// from the alert `evalContext` that generates the images.