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