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:
kay.one 2013-08-25 22:14:55 -07:00
commit 4188946395
20 changed files with 135 additions and 198 deletions

View file

@ -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)