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()); }
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)); } }
public IEnumerable <VaultKeepViewModel> getKeepByVaultId(int id, string userId) { IEnumerable <VaultKeepViewModel> check = _repo.GetKeepByVaultId(id, userId); return(check); }