Fix warnings

This commit is contained in:
nicolas.dorier 2020-03-10 21:28:00 +09:00
parent a9bf843be0
commit 691a8d6fd8
No known key found for this signature in database
GPG key ID: 6618763EF09186FE

View file

@ -40,10 +40,10 @@ namespace BTCPayServer.Controllers
}
return View("Confirm", new ConfirmModel()
{
Title = "Delete API Key "+ ( string.IsNullOrEmpty(key.Label)? string.Empty: key.Label) + "("+key.Id+")",
Title = "Delete API Key " + (string.IsNullOrEmpty(key.Label) ? string.Empty : key.Label) + "(" + key.Id + ")",
Description = "Any application using this api key will immediately lose access",
Action = "Delete",
ActionUrl = Request.GetCurrentUrl().Replace("RemoveAPIKey", "RemoveAPIKeyPost")
ActionUrl = this.Url.ActionLink(nameof(RemoveAPIKeyPost), values: new { id = id })
});
}
@ -247,7 +247,7 @@ namespace BTCPayServer.Controllers
{
var key = new APIKeyData()
{
Id = Guid.NewGuid().ToString().Replace("-", string.Empty),
Id = Guid.NewGuid().ToString().Replace("-", string.Empty, StringComparison.OrdinalIgnoreCase),
Type = APIKeyType.Permanent,
UserId = _userManager.GetUserId(User),
Label = viewModel.Label