New: Differentiate webhook delete event types

pull/2222/head
Qstick 2 years ago
parent 7ac8b5600e
commit e22f284a14

@ -93,7 +93,7 @@ namespace NzbDrone.Core.Notifications.Webhook
{ {
return new WebhookBookDeletePayload return new WebhookBookDeletePayload
{ {
EventType = WebhookEventType.Delete, EventType = WebhookEventType.BookDelete,
InstanceName = _configFileProvider.InstanceName, InstanceName = _configFileProvider.InstanceName,
Author = new WebhookAuthor(deleteMessage.Book.Author), Author = new WebhookAuthor(deleteMessage.Book.Author),
Book = new WebhookBook(deleteMessage.Book), Book = new WebhookBook(deleteMessage.Book),
@ -105,7 +105,7 @@ namespace NzbDrone.Core.Notifications.Webhook
{ {
return new WebhookBookFileDeletePayload return new WebhookBookFileDeletePayload
{ {
EventType = WebhookEventType.Delete, EventType = WebhookEventType.BookFileDelete,
InstanceName = _configFileProvider.InstanceName, InstanceName = _configFileProvider.InstanceName,
Author = new WebhookAuthor(deleteMessage.Book.Author), Author = new WebhookAuthor(deleteMessage.Book.Author),
Book = new WebhookBook(deleteMessage.Book), Book = new WebhookBook(deleteMessage.Book),
@ -117,7 +117,7 @@ namespace NzbDrone.Core.Notifications.Webhook
{ {
return new WebhookAuthorDeletePayload return new WebhookAuthorDeletePayload
{ {
EventType = WebhookEventType.Delete, EventType = WebhookEventType.AuthorDelete,
InstanceName = _configFileProvider.InstanceName, InstanceName = _configFileProvider.InstanceName,
Author = new WebhookAuthor(deleteMessage.Author), Author = new WebhookAuthor(deleteMessage.Author),
DeletedFiles = deleteMessage.DeletedFiles DeletedFiles = deleteMessage.DeletedFiles

@ -12,7 +12,9 @@ namespace NzbDrone.Core.Notifications.Webhook
Grab, Grab,
Download, Download,
Rename, Rename,
Delete, AuthorDelete,
BookDelete,
BookFileDelete,
Health, Health,
Retag, Retag,
ApplicationUpdate ApplicationUpdate

Loading…
Cancel
Save