diff --git a/AsbCloudApp/Services/IPlannedTrajectoryImportService.cs b/AsbCloudApp/Services/IPlannedTrajectoryImportService.cs index e1a9b328..f3e3a162 100644 --- a/AsbCloudApp/Services/IPlannedTrajectoryImportService.cs +++ b/AsbCloudApp/Services/IPlannedTrajectoryImportService.cs @@ -19,7 +19,7 @@ namespace AsbCloudApp.Services /// Получить имя файла (исходя из названия скважины) /// /// - string GetFileNameAsync(int idWell, CancellationToken token); + Task GetFileNameAsync(int idWell, CancellationToken token); /// /// загрузить текущую плановую траекторию в .xlsx diff --git a/AsbCloudInfrastructure/Services/PlannedTrajectory/PlannedTrajectoryImportService.cs b/AsbCloudInfrastructure/Services/PlannedTrajectory/PlannedTrajectoryImportService.cs index 97be473a..5dd1c414 100644 --- a/AsbCloudInfrastructure/Services/PlannedTrajectory/PlannedTrajectoryImportService.cs +++ b/AsbCloudInfrastructure/Services/PlannedTrajectory/PlannedTrajectoryImportService.cs @@ -56,9 +56,9 @@ namespace AsbCloudInfrastructure.Services.PlannedTrajectory return stream; } - public string GetFileNameAsync (int idWell, CancellationToken token) + public async Task GetFileNameAsync (int idWell, CancellationToken token) { - var fileName = wellService.GetWellCaptionByIdAsync(idWell, token) + "_plannedTrajectory.xlsx"; + var fileName = await wellService.GetWellCaptionByIdAsync(idWell, token) + "_plannedTrajectory.xlsx"; return fileName; } diff --git a/AsbCloudWebApi/Controllers/PlannedTrajectoryController.cs b/AsbCloudWebApi/Controllers/PlannedTrajectoryController.cs index 80349b6f..362211c2 100644 --- a/AsbCloudWebApi/Controllers/PlannedTrajectoryController.cs +++ b/AsbCloudWebApi/Controllers/PlannedTrajectoryController.cs @@ -61,7 +61,7 @@ namespace AsbCloudWebApi.Controllers token).ConfigureAwait(false)) return Forbid(); var stream = await plannedTrajectoryImportService.ExportAsync(idWell, token); - var fileName = plannedTrajectoryImportService.GetFileNameAsync(idWell, token); + var fileName = plannedTrajectoryImportService.GetFileNameAsync(idWell, token).Result.ToString(); return File(stream, "application/octet-stream", fileName); }