mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Minor controller updates as the web app expects no content
This commit is contained in:
@@ -84,7 +84,7 @@ namespace Jackett.Server.Controllers
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Route("{indexerId?}/Config")]
|
[Route("{indexerId?}/Config")]
|
||||||
[TypeFilter(typeof(RequiresIndexer))]
|
[TypeFilter(typeof(RequiresIndexer))]
|
||||||
public async Task UpdateConfig([FromBody]Common.Models.DTO.ConfigItem[] config)
|
public async Task<IActionResult> UpdateConfig([FromBody]Common.Models.DTO.ConfigItem[] config)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -95,7 +95,11 @@ namespace Jackett.Server.Controllers
|
|||||||
var configurationResult = await CurrentIndexer.ApplyConfiguration(json);
|
var configurationResult = await CurrentIndexer.ApplyConfiguration(json);
|
||||||
|
|
||||||
if (configurationResult == IndexerConfigurationStatus.RequiresTesting)
|
if (configurationResult == IndexerConfigurationStatus.RequiresTesting)
|
||||||
|
{
|
||||||
await IndexerService.TestIndexer(CurrentIndexer.ID);
|
await IndexerService.TestIndexer(CurrentIndexer.ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new NoContentResult();
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
@@ -40,7 +40,7 @@ namespace Jackett.Server.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public void AdminPassword([FromBody]string password)
|
public IActionResult AdminPassword([FromBody]string password)
|
||||||
{
|
{
|
||||||
var oldPassword = serverConfig.AdminPassword;
|
var oldPassword = serverConfig.AdminPassword;
|
||||||
if (string.IsNullOrEmpty(password))
|
if (string.IsNullOrEmpty(password))
|
||||||
@@ -51,6 +51,8 @@ namespace Jackett.Server.Controllers
|
|||||||
serverConfig.AdminPassword = securityService.HashPassword(password);
|
serverConfig.AdminPassword = securityService.HashPassword(password);
|
||||||
configService.SaveConfig(serverConfig);
|
configService.SaveConfig(serverConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return new NoContentResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
@@ -54,20 +54,24 @@ namespace Jackett.Server.Controllers
|
|||||||
[HttpGet]
|
[HttpGet]
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
//[AllowAnonymous]
|
//[AllowAnonymous]
|
||||||
public async Task<HttpResponseMessage> Dashboard()
|
public IActionResult Dashboard()
|
||||||
{
|
{
|
||||||
if (Request.Path != null && Request.Path.ToString().Contains("logout"))
|
var result = new PhysicalFileResult(config.GetContentFolder() + "/index.html", "text/html");
|
||||||
{
|
return result;
|
||||||
var file = GetFile("login.html");
|
|
||||||
securityService.Logout(file);
|
|
||||||
return file;
|
//if (Request.Path != null && Request.Path.ToString().Contains("logout"))
|
||||||
}
|
//{
|
||||||
|
// var file = GetFile("login.html");
|
||||||
|
// securityService.Logout(file);
|
||||||
|
// return file;
|
||||||
|
//}
|
||||||
|
|
||||||
//TODO
|
//TODO
|
||||||
|
|
||||||
//if (securityService.CheckAuthorised(Request))
|
//if (securityService.CheckAuthorised(Request))
|
||||||
//{
|
//{
|
||||||
return GetFile("index.html");
|
//return GetFile("index.html");
|
||||||
|
|
||||||
//}
|
//}
|
||||||
//else
|
//else
|
||||||
|
Reference in New Issue
Block a user