Exemplo n.º 1
0
        public async Task <IActionResult> MakeActive(int id)
        {
            ApplicationUser admin = await _userService.GetUserAsync(User);

            if (await _userService.IsInRoleAsync(admin, RoleHandler.Admin))
            {
                _routeService.ActivateRoute(id);
            }

            return(RedirectToAction(nameof(List), "Route", new { archived = "true" }));
        }