From 3238d36e100e576bba9b74ac6a4dc364fbccaae2 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 28 Apr 2020 22:23:55 +0000 Subject: [PATCH] --- source/Plugins/AyaNova.Plugin.V8/V8.cs | 2 +- source/Plugins/AyaNova.Plugin.V8/util.cs | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index 2ccb089..4433475 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -392,7 +392,7 @@ namespace AyaNova.PlugIn.V8 d.uiColor = System.Drawing.ColorTranslator.ToHtml(System.Drawing.Color.FromArgb(c.ScheduleBackColor)); d.emailAddress = c.EmailAddress; - util.PutAsync("UserOptions/" + RavenId.ToString(), d.ToString()); + await util.PutAsync("UserOptions/" + RavenId.ToString(), d.ToString()); } } diff --git a/source/Plugins/AyaNova.Plugin.V8/util.cs b/source/Plugins/AyaNova.Plugin.V8/util.cs index 311e216..007f6bf 100644 --- a/source/Plugins/AyaNova.Plugin.V8/util.cs +++ b/source/Plugins/AyaNova.Plugin.V8/util.cs @@ -134,8 +134,8 @@ namespace AyaNova.PlugIn.V8 { throw new Exception("GET error, route: " + route + "\n" + responseAsString + "\n" + response.ReasonPhrase); } - - return new ApiResponse() { HttpResponse = response, ObjectResponse = Parse(responseAsString) }; + else + return new ApiResponse() { HttpResponse = response, ObjectResponse = Parse(responseAsString) }; } public async static Task PostAsync(string route, string postJson = null) @@ -154,8 +154,8 @@ namespace AyaNova.PlugIn.V8 { throw new Exception("POST error, route: " + route + "\n" + responseAsString + "\n" + response.ReasonPhrase); } - - return new ApiResponse() { HttpResponse = response, ObjectResponse = Parse(responseAsString) }; + else + return new ApiResponse() { HttpResponse = response, ObjectResponse = Parse(responseAsString) }; } public async static Task PutAsync(string route, string putJson = null) @@ -175,8 +175,8 @@ namespace AyaNova.PlugIn.V8 { throw new Exception("PUT error, route: " + route + "\n" + responseAsString + "\n" + response.ReasonPhrase); } - - return new ApiResponse() { HttpResponse = response, ObjectResponse = Parse(responseAsString) }; + else + return new ApiResponse() { HttpResponse = response, ObjectResponse = Parse(responseAsString) }; } @@ -199,12 +199,12 @@ namespace AyaNova.PlugIn.V8 public async static Task EventLog(int RavenType, long RavenId, long RavenCreatorId, long RavenModifierId, string sCreated, string sModified) { DateTime Created = DateTime.UtcNow; - if(!string.IsNullOrWhiteSpace(sCreated)) - Created=DateTime.Parse(sCreated).ToUniversalTime(); + if (!string.IsNullOrWhiteSpace(sCreated)) + Created = DateTime.Parse(sCreated).ToUniversalTime(); DateTime Modified = DateTime.UtcNow; - if(!string.IsNullOrWhiteSpace(sCreated)) - Modified = DateTime.Parse(sModified).ToUniversalTime(); + if (!string.IsNullOrWhiteSpace(sCreated)) + Modified = DateTime.Parse(sModified).ToUniversalTime(); dynamic d = new JObject(); d.ayType = RavenType;