Merge pull request #935 from ALenfant/add_legacy_version_endpoint

Add legacy /version/api endpoint
This commit is contained in:
Roger Far 2026-02-22 10:40:18 -07:00 committed by GitHub
commit 0af0b41bb8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,6 +16,16 @@ namespace RdtClient.Web.Controllers;
[Route("qbittorrent/api/v2")] [Route("qbittorrent/api/v2")]
public class QBittorrentController(ILogger<QBittorrentController> logger, QBittorrent qBittorrent) : Controller 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] [AllowAnonymous]
[Route("auth/login")] [Route("auth/login")]
[HttpGet] [HttpGet]