diff --git a/src/Jackett.Server/Controllers/IndexerApiController.cs b/src/Jackett.Server/Controllers/IndexerApiController.cs index 382d88acf..093a190e8 100644 --- a/src/Jackett.Server/Controllers/IndexerApiController.cs +++ b/src/Jackett.Server/Controllers/IndexerApiController.cs @@ -84,7 +84,7 @@ namespace Jackett.Server.Controllers [HttpPost] [Route("{indexerId?}/Config")] [TypeFilter(typeof(RequiresIndexer))] - public async Task UpdateConfig([FromBody]Common.Models.DTO.ConfigItem[] config) + public async Task UpdateConfig([FromBody]Common.Models.DTO.ConfigItem[] config) { try { @@ -95,7 +95,11 @@ namespace Jackett.Server.Controllers var configurationResult = await CurrentIndexer.ApplyConfiguration(json); if (configurationResult == IndexerConfigurationStatus.RequiresTesting) + { await IndexerService.TestIndexer(CurrentIndexer.ID); + } + + return new NoContentResult(); } catch { diff --git a/src/Jackett.Server/Controllers/ServerConfigurationController.cs b/src/Jackett.Server/Controllers/ServerConfigurationController.cs index 5d3a59579..422c2f912 100644 --- a/src/Jackett.Server/Controllers/ServerConfigurationController.cs +++ b/src/Jackett.Server/Controllers/ServerConfigurationController.cs @@ -40,7 +40,7 @@ namespace Jackett.Server.Controllers } [HttpPost] - public void AdminPassword([FromBody]string password) + public IActionResult AdminPassword([FromBody]string password) { var oldPassword = serverConfig.AdminPassword; if (string.IsNullOrEmpty(password)) @@ -51,6 +51,8 @@ namespace Jackett.Server.Controllers serverConfig.AdminPassword = securityService.HashPassword(password); configService.SaveConfig(serverConfig); } + + return new NoContentResult(); } [HttpPost] diff --git a/src/Jackett.Server/Controllers/UIController.cs b/src/Jackett.Server/Controllers/UIController.cs index 3269e1afc..8221325d5 100644 --- a/src/Jackett.Server/Controllers/UIController.cs +++ b/src/Jackett.Server/Controllers/UIController.cs @@ -54,20 +54,24 @@ namespace Jackett.Server.Controllers [HttpGet] [HttpPost] //[AllowAnonymous] - public async Task Dashboard() + public IActionResult Dashboard() { - if (Request.Path != null && Request.Path.ToString().Contains("logout")) - { - var file = GetFile("login.html"); - securityService.Logout(file); - return file; - } + var result = new PhysicalFileResult(config.GetContentFolder() + "/index.html", "text/html"); + return result; + + + //if (Request.Path != null && Request.Path.ToString().Contains("logout")) + //{ + // var file = GetFile("login.html"); + // securityService.Logout(file); + // return file; + //} //TODO //if (securityService.CheckAuthorised(Request)) //{ - return GetFile("index.html"); + //return GetFile("index.html"); //} //else