コード例 #1
0
 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)));
     }
 }