예제 #1
0
 public ActionResult <IEnumerable <VaultKeep> > GetOne(int id)
 {
     try
     {
         return(Ok(_vaultKeepsService.GetOne(id)));
     }
     catch (System.Exception error)
     {
         return(BadRequest(error.Message));
     }
 }
예제 #2
0
 public ActionResult <VaultKeep> GetOne(int id)
 {
     try
     {
         return(Ok(_vks.GetOne(id)));
     }
     catch (System.Exception err)
     {
         return(BadRequest(err.Message));
     }
 }
예제 #3
0
        public async Task <ActionResult <IEnumerable <VaultKeep> > > GetOne(int id)
        {
            try
            {
                Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>();

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