public ActionResult <IEnumerable <Keep> > GetByUser() { try { string currentUser = HttpContext.User.FindFirstValue("Id"); return(Ok(_repo.GetByUser(currentUser))); } catch (Exception e) { return(BadRequest(e)); } }
//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)); } }
public IEnumerable <Keep> GetByUser(int userid) { return(_db.GetByUser(userid)); }