public ActionResult <Vault> GetVault(int vaultid) { Vault result = _repo.GetVaultById(vaultid); if (result != null) { return(Ok(result)); } return(BadRequest()); }
public ActionResult <Vault> Get(int id) { try { return(Ok(_repo.GetVaultById(id))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public ActionResult <Vault> GetVaultById(int id, string userId) { try { // string userId = HttpContext.User.FindFirstValue("Id"); //stacko //FIXME CANNOT READ PROPERTY 'ID' OF UNDEFINED return(Ok(_repository.GetVaultById(id, userId))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public ActionResult <Vault> GetOne(int id) { return(Ok(_vaultRepo.GetVaultById(id))); }