mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-30 19:50:15 -07: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:
parent
438e3199de
commit
4188946395
20 changed files with 135 additions and 198 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue