mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-27 04:21:27 +02:00
Added more magic to fancy. it now automatically figures our response for PUT and POST based on request ID.
file name sample uses HTTP GET instead of post
This commit is contained in:
@@ -42,29 +42,17 @@ namespace NzbDrone.Api.Notifications
|
||||
return result;
|
||||
}
|
||||
|
||||
private NotificationResource Create(NotificationResource notificationResource)
|
||||
private int Create(NotificationResource notificationResource)
|
||||
{
|
||||
var notification = GetNotification(notificationResource);
|
||||
|
||||
notification = _notificationService.Create(notification);
|
||||
notificationResource.Id = notification.Id;
|
||||
|
||||
var response = notification.InjectTo<NotificationResource>();
|
||||
response.Fields = SchemaBuilder.GenerateSchema(notification.Settings);
|
||||
|
||||
return response;
|
||||
return _notificationService.Create(notification).Id;
|
||||
}
|
||||
|
||||
private NotificationResource Update(NotificationResource notificationResource)
|
||||
private void Update(NotificationResource notificationResource)
|
||||
{
|
||||
var notification = GetNotification(notificationResource);
|
||||
notification.Id = notificationResource.Id;
|
||||
notification = _notificationService.Update(notification);
|
||||
|
||||
var response = notification.InjectTo<NotificationResource>();
|
||||
response.Fields = SchemaBuilder.GenerateSchema(notification.Settings);
|
||||
|
||||
return response;
|
||||
_notificationService.Update(notification);
|
||||
}
|
||||
|
||||
private void DeleteNotification(int id)
|
||||
|
Reference in New Issue
Block a user