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)
|
if (Settings.Get.General.AuthenticationType == AuthenticationType.None)
|
||||||
{
|
{
|
||||||
return Ok("Ok.");
|
return Content("Ok.", "text/plain");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (String.IsNullOrWhiteSpace(request.UserName) || String.IsNullOrEmpty(request.Password))
|
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);
|
var result = await qBittorrent.AuthLogin(request.UserName, request.Password);
|
||||||
|
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
return Ok("Ok.");
|
return Content("Ok.", "text/plain");
|
||||||
}
|
}
|
||||||
|
|
||||||
return Ok("Fails.");
|
return Content("Fails.", "text/plain");
|
||||||
}
|
}
|
||||||
|
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue