Beispiel #1
0
        public async Task <IActionResult> SnimiSifru(PromjenaSifreVM model)
        {
            var request = new ChangePasswordRequest()
            {
                OldPassword = model.StaraSifra,
                NewPassword = model.NovaSifra
            };
            var response = await _restoranApi.ChangePassword(request);

            if (response.IsSuccessStatusCode)
            {
                return(Redirect("/Korisnik/Home/Index"));
            }

            return(Redirect(nameof(PromjenaSifre)));
        }