コード例 #1
0
 public ActionResult <IEnumerable <Event> > GetEventsByUser()
 {
     try
     {
         string userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
         return(Ok(_es.GetEventsByUser(userId)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     };
 }