Notifications: Fix mark all as seen return URL

Fixes the return URL for the case in which the dropdown content got replaced after a notification update: As the refresh request is done via AJAX, the return URL previously was `/notifications/getnotificationdropdownui` (the `Context.Request.GetCurrentPathWithQueryString()` value of the AJAX action).

We need to pass in the URL of the actual current page as the return URL.
This commit is contained in:
Dennis Reimann
2022-06-09 18:25:05 +02:00
committed by Andrew Camilleri
parent 3d63e12c9e
commit fd3d389557
5 changed files with 15 additions and 7 deletions

View File

@@ -43,9 +43,9 @@ namespace BTCPayServer.Controllers
}
[HttpGet]
public IActionResult GetNotificationDropdownUI()
public IActionResult GetNotificationDropdownUI(string returnUrl)
{
return ViewComponent("Notifications", new { appearance = "Dropdown" });
return ViewComponent("Notifications", new { appearance = "Dropdown", returnUrl });
}
[HttpGet]