diff --git a/uSync.Backoffice.Management.Api/Controllers/Actions/uSyncPerformActionController.cs b/uSync.Backoffice.Management.Api/Controllers/Actions/uSyncPerformActionController.cs index 6e05a054..7c4e7cc2 100644 --- a/uSync.Backoffice.Management.Api/Controllers/Actions/uSyncPerformActionController.cs +++ b/uSync.Backoffice.Management.Api/Controllers/Actions/uSyncPerformActionController.cs @@ -81,7 +81,7 @@ public async Task ProcessUpload(Guid tempKey) using (var stream = tempFile.OpenReadStream()) { - return Ok(_managementService.UnpackStream(stream)); + return Ok(await _managementService.UnpackStreamAsync(stream)); } } } diff --git a/uSync.Backoffice.Management.Api/Services/ISyncManagementService.cs b/uSync.Backoffice.Management.Api/Services/ISyncManagementService.cs index 09e39586..bb658cda 100644 --- a/uSync.Backoffice.Management.Api/Services/ISyncManagementService.cs +++ b/uSync.Backoffice.Management.Api/Services/ISyncManagementService.cs @@ -22,5 +22,9 @@ public interface ISyncManagementService Func> GetHandlerMethodAsync(HandlerActions action); Task GetSyncFileInfo(); Task PerformActionAsync(PerformActionRequest actionRequest, IUser? user); - UploadImportResult UnpackStream(Stream stream); + + [Obsolete("use UnpackStreamAsync will be removed in v19")] + UploadImportResult UnpackStream(Stream stream) + => UnpackStreamAsync(stream).Result; + Task UnpackStreamAsync(Stream stream); } \ No newline at end of file diff --git a/uSync.Backoffice.Management.Api/Services/uSyncManagementService.cs b/uSync.Backoffice.Management.Api/Services/uSyncManagementService.cs index deaf689a..21e99b19 100644 --- a/uSync.Backoffice.Management.Api/Services/uSyncManagementService.cs +++ b/uSync.Backoffice.Management.Api/Services/uSyncManagementService.cs @@ -427,8 +427,8 @@ public Stream CompressExportFolder() /// /// take a zip file as a stream expand it over the current uSync folder. /// - public UploadImportResult UnpackStream(Stream stream) - => _syncActionService.UnpackImportFromStream(stream); + public async Task UnpackStreamAsync(Stream stream) + => await _syncActionService.UnpackImportFromStreamAsync(stream); public async Task GetSyncFileInfo() => await _syncVersionFileService.GetSyncFileInfo(_configService.GetWorkingFolder());