Simplify FirstOrDefault method call

This commit is contained in:
Umar Bolatov 2021-06-03 20:56:28 -07:00
parent bc33b32522
commit 1b39742919
No known key found for this signature in database
GPG Key ID: 2C1F9AEB371D2A28

View File

@ -125,7 +125,7 @@ namespace BTCPayServer.HostedServices
public async Task<DeliveryResult> TestWebhook(string storeId, string webhookId, WebhookEventType webhookEventType) public async Task<DeliveryResult> TestWebhook(string storeId, string webhookId, WebhookEventType webhookEventType)
{ {
var delivery = NewDelivery(webhookId); var delivery = NewDelivery(webhookId);
var webhook = (await StoreRepository.GetWebhooks(storeId)).Where(w => w.Id == webhookId).FirstOrDefault(); var webhook = (await StoreRepository.GetWebhooks(storeId)).FirstOrDefault(w => w.Id == webhookId);
var deliveryRequest = new WebhookDeliveryRequest( var deliveryRequest = new WebhookDeliveryRequest(
webhookId, webhookId,
GetTestWebHook(storeId, webhookId, webhookEventType, delivery), GetTestWebHook(storeId, webhookId, webhookEventType, delivery),