|
|
|
@ -36,29 +36,29 @@ namespace NzbDrone.Api.QualityProfiles
|
|
|
|
|
return Mapper.Map<QualityProfile, QualityProfileModel>(profile);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override object OnPost(QualityProfileModel data)
|
|
|
|
|
{
|
|
|
|
|
//Create
|
|
|
|
|
var profile = Mapper.Map<QualityProfileModel, QualityProfile>(data);
|
|
|
|
|
public override object OnPost(QualityProfileModel request)
|
|
|
|
|
{
|
|
|
|
|
var profile = Mapper.Map<QualityProfileModel, QualityProfile>(request);
|
|
|
|
|
_qualityProvider.Add(profile);
|
|
|
|
|
|
|
|
|
|
return data;
|
|
|
|
|
return request;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override object OnPut(QualityProfileModel data)
|
|
|
|
|
{
|
|
|
|
|
//Update
|
|
|
|
|
var profile = Mapper.Map<QualityProfileModel, QualityProfile>(data);
|
|
|
|
|
public override object OnPut(QualityProfileModel request)
|
|
|
|
|
{
|
|
|
|
|
var profile = Mapper.Map<QualityProfileModel, QualityProfile>(request);
|
|
|
|
|
_qualityProvider.Update(profile);
|
|
|
|
|
|
|
|
|
|
return data;
|
|
|
|
|
return request;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override object OnDelete(QualityProfileModel data)
|
|
|
|
|
public override object OnDelete(QualityProfileModel request)
|
|
|
|
|
{
|
|
|
|
|
_qualityProvider.Delete(data.Id);
|
|
|
|
|
_qualityProvider.Delete(request.Id);
|
|
|
|
|
|
|
|
|
|
return "ok";
|
|
|
|
|
return request.Id.ToString();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|