aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/PackageController.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-11-15 13:12:43 -0700
committercrobibero <cody@robibe.ro>2020-11-15 13:12:43 -0700
commit4b15284324cf65bc916a3112b7fc61c958ac70c5 (patch)
treee125c2e1f04526509cc6f0c72e7e922c4276e02e /Jellyfin.Api/Controllers/PackageController.cs
parent7ff212576e1fba5980163bcc1cd97c29aadc635f (diff)
parent2f426dfc97677deffb60420078b20a7f5f03977e (diff)
Merge remote-tracking branch 'upstream/master' into bye-tvdb
Diffstat (limited to 'Jellyfin.Api/Controllers/PackageController.cs')
-rw-r--r--Jellyfin.Api/Controllers/PackageController.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/PackageController.cs b/Jellyfin.Api/Controllers/PackageController.cs
index 1d9de14d2..1f797d6bc 100644
--- a/Jellyfin.Api/Controllers/PackageController.cs
+++ b/Jellyfin.Api/Controllers/PackageController.cs
@@ -54,6 +54,11 @@ namespace Jellyfin.Api.Controllers
string.IsNullOrEmpty(assemblyGuid) ? default : Guid.Parse(assemblyGuid))
.FirstOrDefault();
+ if (result == null)
+ {
+ return NotFound();
+ }
+
return result;
}
@@ -149,12 +154,13 @@ namespace Jellyfin.Api.Controllers
/// <param name="repositoryInfos">The list of package repositories.</param>
/// <response code="204">Package repositories saved.</response>
/// <returns>A <see cref="NoContentResult"/>.</returns>
- [HttpOptions("Repositories")]
+ [HttpPost("Repositories")]
[Authorize(Policy = Policies.DefaultAuthorization)]
[ProducesResponseType(StatusCodes.Status204NoContent)]
public ActionResult SetRepositories([FromBody] List<RepositoryInfo> repositoryInfos)
{
_serverConfigurationManager.Configuration.PluginRepositories = repositoryInfos;
+ _serverConfigurationManager.SaveConfiguration();
return NoContent();
}
}