Example #1
0
        public async Task <IActionResult> Login(InputModels.LoginInput input)
        {
            if (ModelState.IsValid)
            {
                var serviceResponse = await AccountRepository.Login(input);

                return(await ForumViewResult.RedirectFromService(this, serviceResponse, FailureCallback));
            }

            return(await FailureCallback());

            async Task <IActionResult> FailureCallback()
            {
                return(await Task.Run(() => {
                    var classicLogin = Url.Action(nameof(LoginClassic));
                    return ForumViewResult.RedirectToLocal(this, classicLogin);
                }));
            }
        }