예제 #1
0
        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());
        }
예제 #2
0
        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());
        }