Exemplo n.º 1
0
 public ActionResult <IEnumerable <Movie> > GetMoviesByUser()
 {
     try
     {
         string userId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
         return(Ok(_ms.GetByUserId(userId)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     };
 }