public IEnumerable <Vault> GetAllByUserId() { var userId = HttpContext.User.Identity.Name; var vaults = _repo.GetUserVaults(userId); return(vaults); }
public ActionResult <IEnumerable <Vault> > Get() { string userId = HttpContext.User.FindFirstValue("Id"); IEnumerable <Vault> userVaults = _repo.GetUserVaults(userId); try { return(Ok(userVaults)); } catch (Exception e) { return(BadRequest(e)); } }
public IEnumerable <Vault> Get() { var userId = HttpContext.User.Identity.Name; return(_repo.GetUserVaults(userId)); }