Beispiel #1
0
        public async Task <IActionResult> Edit(string email)
        {
            if (HttpContext.Session.GetString("Admin") == null || HttpContext.Session.GetString("Admin") == String.Empty)
            {
                return(RedirectToAction("Login", "Admin"));
            }

            using (var client = new HttpClient())
            {
                try
                {
                    if (email.Equals(String.Empty))
                    {
                        return(BadRequest(Lang.LANG_EMAIL_NOT_FOUND));
                    }
                    return(View(await UserVM.GetUserByEmailAsync(client, email)));
                }
                catch (Exception)
                {
                    return(BadRequest(Lang.LANG_CONNECTION_PROBLEM));
                }
            }
        }