Exemple #1
0
 public ScrimEventViewModel AddEvent([FromBody] ScrimEvent scrimEvent)
 {
     if (this.User.Identity.IsAuthenticated)
     {
         var steamId = UserExtensions.GetSteamId(this.User);
         scrimEvent.SteamId = steamId;
         var newEvent          = _schedulingService.AddEvent(scrimEvent);
         var newEventViewModel = this.GetEventViewModel(newEvent);
         _schedulingService.NotifyEventAdded(newEventViewModel);
         return(newEventViewModel);
     }
     return(null);
 }