示例#1
0
 public ActionResult <VaultKeep> GetVaultKeepById(int id)
 {
     try
     {
         return(Ok(_vks.GetVaultKeepById(id)));
     }
     catch (System.Exception err)
     {
         return(BadRequest(err.Message));
     }
 }
示例#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));
     }
 }
示例#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));
            }
        }