示例#1
0
        public async Task <IActionResult> OnPostAsync()
        {
            var user = await _userManger.GetUserAsync(User);

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

            var data = Input.Admins;
            await _factorioServerManager.AddAdminsFromStringAsync(data);

            return(RedirectToPage());
        }