feat: initial commit

This commit is contained in:
Thom Lamb
2026-06-23 11:26:55 -05:00
parent d472a6cff8
commit 1e042cc5e8
722 changed files with 278037 additions and 1 deletions
@@ -0,0 +1,43 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Strata.Stratasphere.Biz.Mappings.Exports;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace Strata.Stratasphere.Api.Controllers
{
[ApiController]
[ApiVersion("1.0")]
[Route("api/v{api-version:apiVersion}/[controller]")]
public class ExportController : ControllerBase
{
private readonly IExportJobService _exportJobService;
public ExportController(IExportJobService exportJobService)
{
_exportJobService = exportJobService;
}
[HttpGet("[action]")]
[ProducesResponseType(StatusCodes.Status202Accepted)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
[ProducesDefaultResponseType]
public async Task<IActionResult> Download([FromQuery] string filename, CancellationToken cancellationToken)
{
var memoryStream = await _exportJobService.DownloadFile(filename, cancellationToken);
return new FileContentResult(memoryStream.ToArray(),
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
{
FileDownloadName = filename
};
}
[HttpGet("[action]")]
public async Task<IEnumerable<string>> GetExports(CancellationToken cancellationToken)
{
return await _exportJobService.GetExports(cancellationToken);
}
}
}