Merge pull request #941 from ALenfant/fix_login_format
Always return plain text from `auth/login` API endpoint
This commit is contained in:
commit
7ec977b36e
1 changed files with 4 additions and 4 deletions
|
|
@ -35,22 +35,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]
|
||||
|
|
|
|||
Loading…
Reference in a new issue