Attempt to fix bug of broken Mark as Seen button on deployed instances

This commit is contained in:
nicolas.dorier
2020-12-15 15:44:36 +09:00
parent a7b178b844
commit 2738c749dc
2 changed files with 5 additions and 1 deletions

View File

@@ -25,7 +25,7 @@
</a>
}
<a class="dropdown-item text-secondary" asp-controller="Notifications" asp-action="Index">See All</a>
<form asp-controller="Notifications" asp-action="MarkAllAsSeen" asp-route-returnUrl="@Context.Request.GetDisplayUrl()" method="post">
<form asp-controller="Notifications" asp-action="MarkAllAsSeen" asp-route-returnUrl="@Context.Request.GetCurrentPathWithQueryString()" method="post">
<button class="dropdown-item text-secondary" type="submit"><i class="fa fa-eye"></i> Mark all as seen</button>
</form>
</div>

View File

@@ -298,6 +298,10 @@ namespace BTCPayServer
request.PathBase.ToUriComponent(),
request.Path.ToUriComponent());
}
public static string GetCurrentPathWithQueryString(this HttpRequest request)
{
return request.PathBase + request.Path + request.QueryString;
}
/// <summary>
/// If 'toto' and RootPath is 'rootpath' returns '/rootpath/toto'