Fix qB auth/login to always return plain text
This commit is contained in:
parent
371a13e060
commit
a7dd01eb42
1 changed files with 5 additions and 5 deletions
|
|
@ -24,22 +24,22 @@ public class QBittorrentController(ILogger<QBittorrentController> logger, QBitto
|
|||
|
||||
if (Settings.Get.General.AuthenticationType == AuthenticationType.None)
|
||||
{
|
||||
return Ok("Ok.");
|
||||
return Content("Ok.", "text/plain");
|
||||
}
|
||||
|
||||
if (String.IsNullOrWhiteSpace(request.UserName) || String.IsNullOrEmpty(request.Password))
|
||||
{
|
||||
return Ok("Fails.");
|
||||
return Content("Fails.", "text/plain");
|
||||
}
|
||||
|
||||
var result = await qBittorrent.AuthLogin(request.UserName, request.Password);
|
||||
|
||||
if (result)
|
||||
{
|
||||
return Ok("Ok.");
|
||||
return Content("Ok.", "text/plain");
|
||||
}
|
||||
|
||||
return Ok("Fails.");
|
||||
return Content("Fails.", "text/plain");
|
||||
}
|
||||
|
||||
[AllowAnonymous]
|
||||
|
|
@ -601,4 +601,4 @@ public class QBTorrentsRemoveCategoryRequest
|
|||
public class QBTorrentsHashesRequest
|
||||
{
|
||||
public String? Hashes { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue