Exemplo n.º 1
0
        public ActionResult <IEnumerable <Keep> > GetKeepByVaultId(int id)
        {
            var uid    = HttpContext.User.Identity.Name;
            var result = _repo.GetKeepByVaultId(id, uid);

            if (result != null)
            {
                return(Ok(result));
            }
            return(BadRequest());
        }
Exemplo n.º 2
0
 public ActionResult <IEnumerable <Keep> > GetKeepByVaultId(int vault)
 {
     try
     {
         string currentUser = HttpContext.User.FindFirstValue("Id");
         return(Ok(_repo.GetKeepByVaultId(vault, currentUser)));
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }
Exemplo n.º 3
0
        public IEnumerable <VaultKeepViewModel> getKeepByVaultId(int id, string userId)
        {
            IEnumerable <VaultKeepViewModel> check = _repo.GetKeepByVaultId(id, userId);

            return(check);
        }