Add debug notifications

This adds a test notif only available in debug mode + endpoint `/Notifications/GenerateJunk` that generates x amount of notifications.
This commit is contained in:
Kukks
2020-08-19 13:31:28 +02:00
parent c4d2ece9c7
commit 68686cd249
3 changed files with 34 additions and 1 deletions

View File

@@ -87,7 +87,18 @@ namespace BTCPayServer.Controllers
return new EmptyResult();
}
#if DEBUG
[HttpGet]
public async Task<IActionResult> GenerateJunk(int x = 100)
{
for (int i = 0; i < x; i++)
{
await _notificationSender.SendNotification(new AdminScope(), new JunkNotification());
}
return RedirectToAction("Index");
}
#endif
[HttpGet]
public IActionResult Index(int skip = 0, int count = 50, int timezoneOffset = 0)
{