Change OPTIONS to POST and call SaveConfiguration

pull/4469/head
cvium 4 years ago
parent df2cb7f995
commit 8e0909ef6f

@ -149,12 +149,13 @@ namespace Jellyfin.Api.Controllers
/// <param name="repositoryInfos">The list of package repositories.</param> /// <param name="repositoryInfos">The list of package repositories.</param>
/// <response code="204">Package repositories saved.</response> /// <response code="204">Package repositories saved.</response>
/// <returns>A <see cref="NoContentResult"/>.</returns> /// <returns>A <see cref="NoContentResult"/>.</returns>
[HttpOptions("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] List<RepositoryInfo> repositoryInfos)
{ {
_serverConfigurationManager.Configuration.PluginRepositories = repositoryInfos; _serverConfigurationManager.Configuration.PluginRepositories = repositoryInfos;
_serverConfigurationManager.SaveConfiguration();
return NoContent(); return NoContent();
} }
} }

Loading…
Cancel
Save