示例#1
0
        public IEnumerable <Vault> GetAllByUserId()
        {
            var userId = HttpContext.User.Identity.Name;
            var vaults = _repo.GetUserVaults(userId);

            return(vaults);
        }
示例#2
0
        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));
        }