mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 14:04:26 +01:00
Allow disabling notifications per user and disabling specific notifications per user (#1991)
* Allow disabling notifications per user and disabling specific notifications per use closes #1974 * Add disable notifs for all users * fix term generator for notifications * sow checkboxes instead of multiselect when js is enabled * remove js dependency * fix notif conditions
This commit is contained in:
@@ -89,11 +89,11 @@ namespace BTCPayServer.Controllers
|
||||
}
|
||||
#if DEBUG
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> GenerateJunk(int x = 100)
|
||||
public async Task<IActionResult> GenerateJunk(int x = 100, bool admin=true)
|
||||
{
|
||||
for (int i = 0; i < x; i++)
|
||||
{
|
||||
await _notificationSender.SendNotification(new AdminScope(), new JunkNotification());
|
||||
await _notificationSender.SendNotification(admin? (NotificationScope) new AdminScope(): new UserScope(_userManager.GetUserId(User)), new JunkNotification());
|
||||
}
|
||||
|
||||
return RedirectToAction("Index");
|
||||
|
||||
Reference in New Issue
Block a user