Add legacy /version/api endpoint
This commit is contained in:
parent
371a13e060
commit
e01cd6a979
1 changed files with 10 additions and 0 deletions
|
|
@ -15,6 +15,16 @@ namespace RdtClient.Web.Controllers;
|
|||
[Route("api/v2")]
|
||||
public class QBittorrentController(ILogger<QBittorrentController> logger, QBittorrent qBittorrent) : Controller
|
||||
{
|
||||
[AllowAnonymous]
|
||||
[Route("/version/api")]
|
||||
[HttpGet]
|
||||
[HttpPost]
|
||||
public ActionResult LegacyVersionApi()
|
||||
{
|
||||
// Returning 20 nudges older qB clients to use /api/v2 endpoints.
|
||||
return Content("20", "text/plain");
|
||||
}
|
||||
|
||||
[AllowAnonymous]
|
||||
[Route("auth/login")]
|
||||
[HttpGet]
|
||||
|
|
|
|||
Loading…
Reference in a new issue