mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-30 03:38:26 -07:00
Add forceSave
to the OpenAPI docs
(cherry picked from commit ef0b91b45bc7f1295efb03dc44630f1442e18be1) Fixes #3683
This commit is contained in:
parent
c03335dc43
commit
296773387e
1 changed files with 1 additions and 3 deletions
|
@ -2,7 +2,6 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using FluentValidation.Results;
|
using FluentValidation.Results;
|
||||||
using Lidarr.Http.Extensions;
|
|
||||||
using Lidarr.Http.REST;
|
using Lidarr.Http.REST;
|
||||||
using Lidarr.Http.REST.Attributes;
|
using Lidarr.Http.REST.Attributes;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
@ -74,10 +73,9 @@ namespace Lidarr.Api.V1
|
||||||
}
|
}
|
||||||
|
|
||||||
[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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue