mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Refactoring of Webhooks and Email Rules (#6954)
This commit is contained in:
15
BTCPayServer/Plugins/Webhooks/WebhooksTranslationProvider.cs
Normal file
15
BTCPayServer/Plugins/Webhooks/WebhooksTranslationProvider.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
#nullable enable
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using BTCPayServer.Plugins.Webhooks.Views;
|
||||
using BTCPayServer.Services;
|
||||
|
||||
namespace BTCPayServer.Plugins.Webhooks;
|
||||
|
||||
public class WebhooksTranslationProvider(IEnumerable<AvailableWebhookViewModel> viewModels) : IDefaultTranslationProvider
|
||||
{
|
||||
public Task<KeyValuePair<string, string?>[]> GetDefaultTranslations()
|
||||
=> Task.FromResult(viewModels.Select(vm => KeyValuePair.Create(vm.Description, vm.Description)).ToArray())!;
|
||||
}
|
||||
Reference in New Issue
Block a user