Esempio n. 1
0
 public ActionResult <IEnumerable <VaultKeep> > GetOne(int id)
 {
     try
     {
         return(Ok(_vaultKeepsService.GetOne(id)));
     }
     catch (System.Exception error)
     {
         return(BadRequest(error.Message));
     }
 }
Esempio n. 2
0
 public ActionResult <VaultKeep> GetOne(int id)
 {
     try
     {
         return(Ok(_vks.GetOne(id)));
     }
     catch (System.Exception err)
     {
         return(BadRequest(err.Message));
     }
 }
Esempio n. 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));
            }
        }