tests and small fix.

This commit is contained in:
BaronGreenback
2021-05-07 14:02:42 +01:00
parent c8061f92be
commit 4f5c9e9504
3 changed files with 62 additions and 2 deletions

View File

@@ -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;
}