|
|
@ -6,7 +6,6 @@ using Microsoft.AspNetCore.Mvc;
|
|
|
|
using NzbDrone.Common.Serializer;
|
|
|
|
using NzbDrone.Common.Serializer;
|
|
|
|
using NzbDrone.Core.ThingiProvider;
|
|
|
|
using NzbDrone.Core.ThingiProvider;
|
|
|
|
using NzbDrone.Core.Validation;
|
|
|
|
using NzbDrone.Core.Validation;
|
|
|
|
using Radarr.Http.Extensions;
|
|
|
|
|
|
|
|
using Radarr.Http.REST;
|
|
|
|
using Radarr.Http.REST;
|
|
|
|
using Radarr.Http.REST.Attributes;
|
|
|
|
using Radarr.Http.REST.Attributes;
|
|
|
|
|
|
|
|
|
|
|
@ -74,10 +73,9 @@ namespace Radarr.Api.V3
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[RestPutById]
|
|
|
|
[RestPutById]
|
|
|
|
public ActionResult<TProviderResource> UpdateProvider(TProviderResource providerResource)
|
|
|
|
public ActionResult<TProviderResource> UpdateProvider([FromBody] TProviderResource providerResource, [FromQuery] bool forceSave = false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var providerDefinition = GetDefinition(providerResource, true, false, false);
|
|
|
|
var providerDefinition = GetDefinition(providerResource, true, false, false);
|
|
|
|
var forceSave = Request.GetBooleanQueryParameter("forceSave");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Only test existing definitions if it is enabled and forceSave isn't set.
|
|
|
|
// Only test existing definitions if it is enabled and forceSave isn't set.
|
|
|
|
if (providerDefinition.Enable && !forceSave)
|
|
|
|
if (providerDefinition.Enable && !forceSave)
|
|
|
|