|
|
@ -2,22 +2,19 @@
|
|
|
|
using System.Linq;
|
|
|
|
using System.Linq;
|
|
|
|
using AutoMapper;
|
|
|
|
using AutoMapper;
|
|
|
|
using Nancy;
|
|
|
|
using Nancy;
|
|
|
|
|
|
|
|
using NzbDrone.Api.QualityProfiles;
|
|
|
|
using NzbDrone.Core.Providers;
|
|
|
|
using NzbDrone.Core.Providers;
|
|
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Api.QualityType
|
|
|
|
namespace NzbDrone.Api.QualityType
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public class QualityTypeModule : NancyModule
|
|
|
|
public class QualityTypeModule : NzbDroneApiModule
|
|
|
|
{
|
|
|
|
{
|
|
|
|
private readonly QualityTypeProvider _qualityTypeProvider;
|
|
|
|
private readonly QualityTypeProvider _qualityTypeProvider;
|
|
|
|
|
|
|
|
|
|
|
|
public QualityTypeModule(QualityTypeProvider qualityTypeProvider)
|
|
|
|
public QualityTypeModule(QualityTypeProvider qualityTypeProvider)
|
|
|
|
{
|
|
|
|
|
|
|
|
_qualityTypeProvider = qualityTypeProvider;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public QualityTypeModule()
|
|
|
|
|
|
|
|
: base("/QualityTypes")
|
|
|
|
: base("/QualityTypes")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
_qualityTypeProvider = qualityTypeProvider;
|
|
|
|
|
|
|
|
|
|
|
|
Get["/"] = x => GetQualityType();
|
|
|
|
Get["/"] = x => GetQualityType();
|
|
|
|
Get["/{id}"] = x => GetQualityType(x.Id);
|
|
|
|
Get["/{id}"] = x => GetQualityType(x.Id);
|
|
|
|