mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-23 14:10:40 +02:00
Merge pull request #5099 from crobibero/non-required-query-param
This commit is contained in:
commit
e5828cdbf1
|
@ -158,7 +158,7 @@ namespace Jellyfin.Api.Controllers
|
||||||
[HttpPost("Repositories")]
|
[HttpPost("Repositories")]
|
||||||
[Authorize(Policy = Policies.DefaultAuthorization)]
|
[Authorize(Policy = Policies.DefaultAuthorization)]
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
public ActionResult SetRepositories([FromBody] List<RepositoryInfo> repositoryInfos)
|
public ActionResult SetRepositories([FromBody, Required] List<RepositoryInfo> repositoryInfos)
|
||||||
{
|
{
|
||||||
_serverConfigurationManager.Configuration.PluginRepositories = repositoryInfos;
|
_serverConfigurationManager.Configuration.PluginRepositories = repositoryInfos;
|
||||||
_serverConfigurationManager.SaveConfiguration();
|
_serverConfigurationManager.SaveConfiguration();
|
||||||
|
|
|
@ -514,7 +514,7 @@ namespace Jellyfin.Api.Controllers
|
||||||
/// <returns>A <see cref="Task"/> containing a <see cref="PinRedeemResult"/>.</returns>
|
/// <returns>A <see cref="Task"/> containing a <see cref="PinRedeemResult"/>.</returns>
|
||||||
[HttpPost("ForgotPassword/Pin")]
|
[HttpPost("ForgotPassword/Pin")]
|
||||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
public async Task<ActionResult<PinRedeemResult>> ForgotPasswordPin([FromBody] string? pin)
|
public async Task<ActionResult<PinRedeemResult>> ForgotPasswordPin([FromBody, Required] string pin)
|
||||||
{
|
{
|
||||||
var result = await _userManager.RedeemPasswordResetPin(pin).ConfigureAwait(false);
|
var result = await _userManager.RedeemPasswordResetPin(pin).ConfigureAwait(false);
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -308,6 +308,9 @@ namespace Jellyfin.Server.Extensions
|
||||||
?? null;
|
?? null;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Allow parameters to properly be nullable.
|
||||||
|
c.UseAllOfToExtendReferenceSchemas();
|
||||||
|
|
||||||
// TODO - remove when all types are supported in System.Text.Json
|
// TODO - remove when all types are supported in System.Text.Json
|
||||||
c.AddSwaggerTypeMappings();
|
c.AddSwaggerTypeMappings();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue