Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
EdiWang committed May 31, 2024
1 parent ae73455 commit 6a4e5e1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Moonglade.Pingback/PingbackSender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Moonglade.Pingback;

public class PingbackSender(HttpClient httpClient,
IPingbackRequestor pingbackRequestor,
IPingbackRequestor requestor,
IConfiguration configuration,
ILogger<PingbackSender> logger)
: IPingbackSender
Expand Down Expand Up @@ -73,19 +73,19 @@ private async Task SendAsync(Uri sourceUrl, Uri targetUrl)
return;
}

var pingUrl = value.FirstOrDefault();
if (pingUrl is not null)
var endpoint = value.FirstOrDefault();
if (endpoint is not null)
{
logger.LogInformation($"Found Ping service URL '{pingUrl}' on target '{sourceUrl}'");
logger.LogInformation($"Found Ping service URL '{endpoint}' on target '{sourceUrl}'");

bool successUrlCreation = Uri.TryCreate(pingUrl, UriKind.Absolute, out var url);
bool successUrlCreation = Uri.TryCreate(endpoint, UriKind.Absolute, out var url);
if (successUrlCreation)
{
var pResponse = await pingbackRequestor.Send(sourceUrl, targetUrl, url);
var pResponse = await requestor.Send(sourceUrl, targetUrl, url);
}
else
{
logger.LogInformation($"Invliad Ping service URL '{pingUrl}'");
logger.LogInformation($"Invliad Ping service URL '{endpoint}'");
}
}
}
Expand Down

0 comments on commit 6a4e5e1

Please sign in to comment.