diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2021-05-07 14:02:42 +0100 |
|---|---|---|
| committer | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2021-05-07 14:02:42 +0100 |
| commit | 4f5c9e95041a39ae549bfa3f36bbeda054bce3ca (patch) | |
| tree | a540673864fa8ceea98facba535b31aadc2be211 /Jellyfin.Api/Controllers/SystemController.cs | |
| parent | c8061f92bec0d1e12e2b57012c6c72c629374327 (diff) | |
tests and small fix.
Diffstat (limited to 'Jellyfin.Api/Controllers/SystemController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/SystemController.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/SystemController.cs b/Jellyfin.Api/Controllers/SystemController.cs index bbbe5fb8d..5c64d731b 100644 --- a/Jellyfin.Api/Controllers/SystemController.cs +++ b/Jellyfin.Api/Controllers/SystemController.cs @@ -84,13 +84,19 @@ namespace Jellyfin.Api.Controllers /// <summary> /// Pings the system. /// </summary> + /// <param name="params">Optional: Parameters to echo back in the response.</param> /// <response code="200">Information retrieved.</response> /// <returns>The server name.</returns> [HttpGet("Ping", Name = "GetPingSystem")] [HttpPost("Ping", Name = "PostPingSystem")] [ProducesResponseType(StatusCodes.Status200OK)] - public ActionResult<string> PingSystem() + public ActionResult<string> PingSystem([FromQuery]Dictionary<string, string>? @params = null) { + if (@params != null && @params.Count > 0) + { + Response.Headers.Add("querystring", string.Join("&", @params.Select(x => x.Key + "=" + x.Value))); + } + return _appHost.Name; } |
