Ejemplo n.º 1
0
 public ActionResult <VaultKeep> GetVaultKeepById(int id)
 {
     try
     {
         return(Ok(_vks.GetVaultKeepById(id)));
     }
     catch (System.Exception err)
     {
         return(BadRequest(err.Message));
     }
 }
Ejemplo n.º 2
0
 public ActionResult <VaultKeep> GetVaultKeepById(int id)
 {
     try
     {
         var userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
         return(Ok(_vks.GetVaultKeepById(id, userId)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Ejemplo n.º 3
0
        public async Task <ActionResult <VaultKeep> > GetVaultKeepById(int id)
        {
            try
            {
                Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>();

                return(Ok(_vks.GetVaultKeepById(id, userInfo)));
            }
            catch (System.Exception e)
            {
                return(BadRequest(e.Message));
            }
        }