Merge pull request #935 from ALenfant/add_legacy_version_endpoint
Add legacy /version/api endpoint
This commit is contained in:
commit
0af0b41bb8
1 changed files with 10 additions and 0 deletions
|
|
@ -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]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue