simplify code

This commit is contained in:
nicolas.dorier
2019-08-03 21:52:47 +09:00
parent ddf8b20091
commit 6d4ea6a951
3 changed files with 15 additions and 41 deletions

View File

@@ -97,7 +97,11 @@ namespace BTCPayServer.Controllers
// addlabelclick is if the user click on existing label. For some reason, reusing the same name attribute for both
// does not work
[ModelBinder(typeof(WalletIdModelBinder))]
WalletId walletId, string transactionId, string addlabel = null, string addlabelclick = null, string addcomment = null, string removelabel = null)
WalletId walletId, string transactionId,
string addlabel = null,
string addlabelclick = null,
string addcomment = null,
string removelabel = null)
{
addlabel = addlabel ?? addlabelclick;
// Hack necessary when the user enter a empty comment and submit.