From ffe0bb156a5d03ce00debc23f317ae491e1e6022 Mon Sep 17 00:00:00 2001 From: vitalii-bezuhlyi Date: Wed, 6 Mar 2024 13:53:04 +0200 Subject: [PATCH] Updated webhook url --- Apps.Memoq/Actions/FileActions.cs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Apps.Memoq/Actions/FileActions.cs b/Apps.Memoq/Actions/FileActions.cs index 5e072e6..da0fffd 100644 --- a/Apps.Memoq/Actions/FileActions.cs +++ b/Apps.Memoq/Actions/FileActions.cs @@ -27,7 +27,7 @@ namespace Apps.Memoq.Actions; public class FileActions : BaseInvocable { private readonly IFileManagementClient _fileManagementClient; - private readonly RestClient _restClient = new("https://webhook.site/10f5d5d3-1a18-4149-8a0e-2fba52af850f"); + private readonly RestClient _restClient = new("https://webhook.site/6f1b10ac-818c-4080-8170-cba1ad8ca3f2"); private IEnumerable Creds => InvocationContext.AuthenticationCredentialsProviders; @@ -182,20 +182,17 @@ public async Task UploadAndImportFileToProject( var uploadFileResult = FileUploader.UploadFile(fileBytes, manager, request.FileName ?? request.File.Name); - + + var targetLanguages = request.TargetLanguageCodes?.ToArray(); + var restRequest3 = new RestRequest(string.Empty, Method.Post).AddJsonBody(new { Status = "File uploaded to file management. Importing...", - Guid = uploadFileResult + Guid = uploadFileResult, + TargetLanguages = targetLanguages }); await _restClient.ExecuteAsync(restRequest3); - - string[]? targetLanguages = request.TargetLanguageCodes?.ToArray() ?? Array.Empty(); - if (targetLanguages.Length == 0) - { - targetLanguages = null; - } var result = await projectService.Service .ImportTranslationDocumentAsync(