mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -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
|
@ -30,11 +30,11 @@ namespace NzbDrone.Api.Qualities
|
|||
DeleteResource = DeleteProfile;
|
||||
}
|
||||
|
||||
private QualityProfileResource Create(QualityProfileResource resource)
|
||||
private int Create(QualityProfileResource resource)
|
||||
{
|
||||
var model = resource.InjectTo<QualityProfile>();
|
||||
model = _qualityProfileService.Add(model);
|
||||
return GetById(model.Id);
|
||||
return model.Id;
|
||||
}
|
||||
|
||||
private void DeleteProfile(int id)
|
||||
|
@ -42,11 +42,10 @@ namespace NzbDrone.Api.Qualities
|
|||
_qualityProfileService.Delete(id);
|
||||
}
|
||||
|
||||
private QualityProfileResource Update(QualityProfileResource resource)
|
||||
private void Update(QualityProfileResource resource)
|
||||
{
|
||||
var model = resource.InjectTo<QualityProfile>();
|
||||
_qualityProfileService.Update(model);
|
||||
return GetById(resource.Id);
|
||||
}
|
||||
|
||||
private QualityProfileResource GetById(int id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue