Beispiel #1
0
 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));
     }
 }
Beispiel #2
0
        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));
            }
        }