Exemplo n.º 1
0
        public async Task <IActionResult> OnGetAsync()
        {
            var user = await _userManger.GetUserAsync(User);

            if (user == null || user.Suspended)
            {
                HttpContext.Session.SetString("returnUrl", "admins");
                return(RedirectToPage("signIn"));
            }

            Admins = await _factorioServerManager.GetAdminsAsync();

            return(Page());
        }