Skip to content

Commit

Permalink
add limit to AddTxQuota
Browse files Browse the repository at this point in the history
  • Loading branch information
area363 committed Nov 1, 2023
1 parent f9049fd commit 7d3a51a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ public AccessControlServiceController(IMutableAccessControlService accessControl
[HttpPost("entries/add-tx-quota/{address}/{quota:int}")]
public ActionResult AddTxQuota(string address, int quota)
{
var maxLimit = 10;
if (quota > maxLimit)
{
return BadRequest($"The limit cannot exceed {maxLimit}.");
}

_accessControlService.AddTxQuota(new Address(address), quota);
return Ok();
}
Expand Down

0 comments on commit 7d3a51a

Please sign in to comment.