public async Task <IActionResult> DeleteIpBan([FromBody] Req <AdminIdDto> request) { var b = await _adminSecurityApplication.DeleteIpBan(request); if (b == false) { return(Error(request.Message)); } await IpAddressHelper.InitIpBlack(_adminSecurityApplication); return(Success()); }
public async Task <IActionResult> EditIpBan([FromBody] Req <IpAddressEditDto> request) { bool b; if (request.Data.Id > 0) { b = await _adminSecurityApplication.EditIpBan(request); } else { b = await _adminSecurityApplication.AddIpBan(request); } if (b == false) { return(Error(request.Message)); } await IpAddressHelper.InitIpBlack(_adminSecurityApplication); return(Success()); }