Пример #1
0
        public IActionResult DownloadLeaderboardByDay(DateTime date)
        {
            string filePath = Path.Combine(_path, $"LeaderboardByDay-{DateTime.Now:yyyy-dd-MM}.xlsx");

            var leaderboard = _leaderboardService.GetLeaderboardByDay(date, true);

            if (leaderboard == null)
            {
                return(NotFound());
            }

            _importExportService.ExportToExcel(leaderboard, filePath);
            return(Ok(filePath));
        }