2018-11-23 07:03:32 +00:00
|
|
|
using NzbDrone.Core.Configuration;
|
2021-10-21 20:04:19 +00:00
|
|
|
using Radarr.Http;
|
2019-12-22 22:08:53 +00:00
|
|
|
using Radarr.Http.Validation;
|
2018-11-23 07:03:32 +00:00
|
|
|
|
2019-12-03 01:36:18 +00:00
|
|
|
namespace Radarr.Api.V3.Config
|
2018-11-23 07:03:32 +00:00
|
|
|
{
|
2021-10-21 20:04:19 +00:00
|
|
|
[V3ApiController("config/importlist")]
|
|
|
|
|
|
|
|
public class ImportListConfigController : ConfigController<ImportListConfigResource>
|
2018-11-23 07:03:32 +00:00
|
|
|
{
|
2021-10-21 20:04:19 +00:00
|
|
|
public ImportListConfigController(IConfigService configService)
|
2018-11-23 07:03:32 +00:00
|
|
|
: base(configService)
|
|
|
|
{
|
2020-09-04 02:50:56 +00:00
|
|
|
SharedValidator.RuleFor(c => c.ImportListSyncInterval)
|
|
|
|
.IsValidImportListSyncInterval();
|
2018-11-23 07:03:32 +00:00
|
|
|
}
|
|
|
|
|
2020-09-04 02:50:56 +00:00
|
|
|
protected override ImportListConfigResource ToResource(IConfigService model)
|
2018-11-23 07:03:32 +00:00
|
|
|
{
|
2020-09-04 02:50:56 +00:00
|
|
|
return ImportListConfigResourceMapper.ToResource(model);
|
2018-11-23 07:03:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|