/// <summary> /// start pub/sub and fetch stored match details from cache /// </summary> /// <param name="matchName">name of match</param> /// <returns>list of updates</returns> public JsonResult OnPostMatchDetails(string matchName) { // subscribe this server to ongoing match topic if (_matchSubscription == null) { ITopic topic = _cache.MessagingService.GetTopic(matchName); // if topic does not exist, return false if (topic == null) { return(new JsonResult(false)); } _matchSubscription = topic.CreateSubscription(MatchUpdates); } // fetch details of ongoing matches List <MatchUpdate> list = _storeHandler.FetchUpdates(matchName); return(new JsonResult(list)); }
public ActionResult <List <MatchUpdate> > GetMatchDetails([FromForm] string matchName) { List <MatchUpdate> list = _storeHandler.FetchUpdates(matchName); return(list); }