Exemplo n.º 1
0
        public async Task <IActionResult> Ban(UserModel model)
        {
            switch (model.BanFor)
            {
            case 1:
                await _applicationUserService.BanFor10Mins(model.UserName);

                break;

            case 2:
                await _applicationUserService.BanForDays(model.UserName);

                break;

            case 3:
                await _applicationUserService.BanForMonth(model.UserName);

                break;

            case 4:
                await _applicationUserService.PermanentBan(model.UserName);

                break;
            }

            return(RedirectToAction("Users", "Profile"));
        }