Ejemplo n.º 1
0
 public IActionResult Index()
 {
     var searchHistory = api.GetSearchHistory(Guid.Parse(User.FindFirstValue(ClaimTypes.Sid)));
     var model = new AccountIndexViewModel(){
         name = User.Identity.Name,
         email = User.FindFirstValue(ClaimTypes.Email),
         history = new List<History>(searchHistory),
         modifyPassword = new ModifyPasswordViewModel()
     };
     return View(model);
 }
Ejemplo n.º 2
0
        public IActionResult GetHistory()
        {
            try{
                var searchHistory = api.GetSearchHistory(Guid.Parse(User.FindFirstValue(ClaimTypes.Sid)));
                return(Json(searchHistory));
            }

            catch (Exception e) {
                return(StatusCode(412, e.Message));
            }
        }