Example #1
0
 // [HttpGet("keeps/user/:userId")]
 public ActionResult <IEnumerable <Keep> > GetByUserId()
 {
     try
     {
         var id = HttpContext.User.FindFirstValue("Id");
         // value.userId = id;
         return(Ok(_repo.GetKeepsByUserId(id)));
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }
Example #2
0
 public IEnumerable <Keep> GetKeepsByUserId(int id)
 {
     return(db.GetKeepsByUserId(id));
 }