public ActionResult <Vault> GetById(int id) { try { var user = HttpContext.User.FindFirstValue("Id"); return(Ok(_repo.GetByVaultId(user, id))); } catch (Exception e) { return(BadRequest(e)); } }
public ActionResult <Vault> GetVaultById(int id) { string userId = HttpContext.User.FindFirstValue("Id"); try { return(Ok(_repo.GetByVaultId(id, userId))); } catch (Exception e) { return(BadRequest(e)); } }