Example #1
0
 public ActionResult <IEnumerable <Keep> > GetByUser()
 {
     try
     {
         string currentUser = HttpContext.User.FindFirstValue("Id");
         return(Ok(_repo.GetByUser(currentUser)));
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }
Example #2
0
 //like bugreport
 public ActionResult <Keep> GetUserKeeps()
 {
     try
     {
         var id = HttpContext.User.FindFirstValue("Id");
         return(Ok(_repo.GetByUser(id))); //returns a list of type keep from db query
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }
Example #3
0
 public IEnumerable <Keep> GetByUser(int userid)
 {
     return(_db.GetByUser(userid));
 }