mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-03 17:36:59 +01:00
Fix tests
This commit is contained in:
parent
edfc82ac75
commit
b8202da7aa
1 changed files with 10 additions and 8 deletions
|
@ -12,8 +12,8 @@ namespace BTCPayServer.Controllers
|
||||||
{
|
{
|
||||||
public IActionResult Handle(int? statusCode = null)
|
public IActionResult Handle(int? statusCode = null)
|
||||||
{
|
{
|
||||||
if (Request.ContentType.StartsWith("application/json", StringComparison.OrdinalIgnoreCase))
|
if (Request.Headers.TryGetValue("Accept", out var v) && v.Any(v => v.Contains("text/html", StringComparison.OrdinalIgnoreCase)))
|
||||||
return this.StatusCode(statusCode.Value);
|
{
|
||||||
if (statusCode.HasValue)
|
if (statusCode.HasValue)
|
||||||
{
|
{
|
||||||
var specialPages = new[] { 404, 429, 500 };
|
var specialPages = new[] { 404, 429, 500 };
|
||||||
|
@ -25,5 +25,7 @@ namespace BTCPayServer.Controllers
|
||||||
}
|
}
|
||||||
return View(statusCode);
|
return View(statusCode);
|
||||||
}
|
}
|
||||||
|
return this.StatusCode(statusCode.Value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue