public ActionResult GetAllFavourites(string userId)
 {
     try
     {
         return(Ok(favouriteService.GetAllFavouritesByUserId(userId)));
     }
     catch (FavouritePlayerNotFoundException favException)
     {
         return(NotFound(favException.Message));
     }
 }
예제 #2
0
 public IActionResult Get(string userId)
 {
     try
     {
         return(Ok(service.GetAllFavouritesByUserId(userId)));
     }
     catch (PlayerNotFoundException p)
     {
         return(NotFound(JsonConvert.SerializeObject(p.Message)));
     }
 }