Пример #1
0
 public async Task<ActionResult<IEnumerable<VaultKeepViewModel>>> GetKeepsByIdAsync(int vaultId)
 {
     try
     {
         return Ok(_vks.GetByVaultId(vaultId));
     }
     catch (Exception e)
     {
         return BadRequest(e.Message);
     }
 }
Пример #2
0
        public async Task <ActionResult <IEnumerable <Keep> > > Get(int vaultId)
        {
            try
            {
                Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>();

                return(Ok(_vks.GetByVaultId(vaultId, userInfo?.Id)));
            }
            catch (System.Exception e)
            {
                return(BadRequest(e.Message));
            }
        }