Ejemplo n.º 1
0
        public IActionResult OnGetICalFile(string team, string dates)
        {
            byte[] file = _twinRinksService.GetICalFile(team, ParseDatesList(dates));

            if (file != null)
            {
                return(File(file, "text/calendar", $"{team.Replace(" ", "_")}.ics"));
            }
            else
            {
                return(RedirectToPage(new { SelectedTeam = team }));
            }
        }
Ejemplo n.º 2
0
        public IActionResult Get(string team)
        {
            team = team.Replace("_", " ");

            byte[] file = _twinRinksService.GetICalFile(team, null);

            if (file != null)
            {
                return(this.File(file, "text/calendar", $"{team.Replace(" ", "_")}.ics"));
            }
            else
            {
                return(this.NotFound());
            }
        }