mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
Don't allow `0` as possible value for metadata and quality profiles, and permit to edit root folders with bad values in UI.
26 lines
731 B
C#
26 lines
731 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using NzbDrone.Core.Profiles.Qualities;
|
|
using Readarr.Http;
|
|
|
|
namespace Readarr.Api.V1.Profiles.Quality
|
|
{
|
|
[V1ApiController("qualityprofile/schema")]
|
|
public class QualityProfileSchemaController : Controller
|
|
{
|
|
private readonly IQualityProfileService _qualityProfileService;
|
|
|
|
public QualityProfileSchemaController(IQualityProfileService qualityProfileService)
|
|
{
|
|
_qualityProfileService = qualityProfileService;
|
|
}
|
|
|
|
[HttpGet]
|
|
public QualityProfileResource GetSchema()
|
|
{
|
|
var qualityProfile = _qualityProfileService.GetDefaultProfile(string.Empty);
|
|
|
|
return qualityProfile.ToResource();
|
|
}
|
|
}
|
|
}
|