This commit is contained in:
2020-04-28 19:31:31 +00:00
parent 22b6942691
commit 5cc547c1b3
2 changed files with 6 additions and 5 deletions

View File

@@ -13,6 +13,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using Newtonsoft.Json.Linq;
namespace AyaNova.PlugIn.V8
{
class V8 : IAyaNovaPlugin
@@ -195,7 +196,7 @@ namespace AyaNova.PlugIn.V8
ExportDispatchZones(progress);
//BIZ objects
ExportUsers(progress);
await ExportUsers(progress);
//dumpGlobalSettings(tempArchiveFolder, progress);
//dumpLocales(tempArchiveFolder, progress);
@@ -213,7 +214,7 @@ namespace AyaNova.PlugIn.V8
}
catch (Exception ex)
{
progress.Append("Export failed with error:");
progress.Append("\n************\nExport failed with error:");
progress.Append(ex.Message);
}
progress.FinishedImport();
@@ -329,7 +330,7 @@ namespace AyaNova.PlugIn.V8
#endregion clients
#region users
private async void ExportUsers(ProgressForm progress)
private async System.Threading.Tasks.Task ExportUsers(ProgressForm progress)
{
//List<string> objectExcludeProperties = new List<string>(standardExcludePropertiesList);
@@ -376,7 +377,7 @@ namespace AyaNova.PlugIn.V8
Tagit(c.DispatchZoneID, tags);
SetTags(d, tags);
var a = await util.PostAsync("User", d.ToString());
await util.PostAsync("User", d.ToString());
//JObject xtra = new JObject();

View File

@@ -152,7 +152,7 @@ namespace AyaNova.PlugIn.V8
var responseAsString = await response.Content.ReadAsStringAsync();
if (!response.IsSuccessStatusCode)
{
throw new Exception(responseAsString + "\n" + response.ReasonPhrase);
throw new Exception("POST error, route: " + route + "\n" + responseAsString + "\n" + response.ReasonPhrase);
}
return new ApiResponse() { HttpResponse = response, ObjectResponse = Parse(responseAsString) };