示例#1
0
 public ActionResult <IEnumerable <Keep> > Get(int id)
 {
     try
     {
         return(Ok(_vks.GetKeeps(id)));
     }
     catch (System.Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
示例#2
0
 public ActionResult <IEnumerable <VaultKeepViewModel> > GetKeeps(int id)
 {
     try
     {
         string userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
         return(Ok(_vks.GetKeeps(id, userId)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
 public ActionResult <IEnumerable <Keep> > GetKeeps(int vaultId)
 {
     try
     {
         string userId = HttpContext.User.FindFirstValue("Id");
         return(Ok(_vks.GetKeeps(vaultId, userId)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
 public ActionResult <VaultKeeps> GetById([FromRoute] int id)
 {
     try
     {
         string userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
         return(Ok(_vks.GetKeeps(id, userId)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }