Skip to content

Commit ad12b5c

Browse files
committed
Update BaseWebhookService.cs
1 parent 43a1670 commit ad12b5c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/RandomAPI/APIServices/Services/BaseWebhookService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ public async Task<IActionResult> HandleRegisterActionAsync([FromBody] string url
4040

4141
public async Task<IActionResult> HandleUnregisterActionAsync([FromBody] string url)
4242
{
43+
string safeUrlForLog = url;
4344
if (string.IsNullOrWhiteSpace(url))
4445
{
45-
var safeUrlForLog = url.Replace("\r", "").Replace("\n", "");
46+
safeUrlForLog = url.Replace("\r", "").Replace("\n", "");
4647
return new BadRequestObjectResult("URL cannot be empty.");
4748
}
4849
url = url.Trim();

0 commit comments

Comments
 (0)