Release of v24.
This commit is contained in:
@@ -42,4 +42,6 @@ D62C10039629E09EC5343B530503D1E2DC1EEBD4 ImEXOnlinePartner-1.0.18-full.nupkg 515
|
||||
B80473EA2E60AFE03F0E22E2C78995A2360D9DB7 ImEXOnlinePartner-1.0.22-delta.nupkg 26086
|
||||
C15C0B6EE335E383F2CEF0EFA32027B7210AA312 ImEXOnlinePartner-1.0.22-full.nupkg 5189952
|
||||
05DE59E77109F985B45F4F7111B170A5BB79568F ImEXOnlinePartner-1.0.23-delta.nupkg 338352
|
||||
9FC3D7604BD9356F5ED8302FA9F256B43EDF4491 ImEXOnlinePartner-1.0.23-full.nupkg 5309975
|
||||
9FC3D7604BD9356F5ED8302FA9F256B43EDF4491 ImEXOnlinePartner-1.0.23-full.nupkg 5309975
|
||||
4ACCFC490941BDDE71896FE47E5E4B8ACA293CD8 ImEXOnlinePartner-1.0.24-delta.nupkg 31450
|
||||
187BA94ACAE7FBF770D1D2894FF3A2F13831E7B3 ImEXOnlinePartner-1.0.24-full.nupkg 5303976
|
||||
@@ -11,6 +11,8 @@ namespace BodyshopPartner.Utils
|
||||
{
|
||||
//TODO: Change firebase API Key to be dependent on what environment monitor has been set for.
|
||||
public static string ActiveShopId = Properties.Settings.Default.LastSelectedShop;
|
||||
public static string ActiveShopName = "";
|
||||
public static string user = "";
|
||||
public static string ShopRegion = "";
|
||||
public static dynamic CiecaOpCodes;
|
||||
private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace BodyshopPartner.Utils
|
||||
logger.Trace("Refresh timer interval set to {0}ms", (authlink.ExpiresIn - 600) * 1000);
|
||||
tokenTimer.Elapsed += TokenTimer_Tick;
|
||||
tokenTimer.Start();
|
||||
AppMetaData.user = Properties.Settings.Default.Username;
|
||||
return (true, null);
|
||||
}
|
||||
catch (FirebaseAuthException Ex)
|
||||
@@ -87,6 +88,7 @@ namespace BodyshopPartner.Utils
|
||||
tokenTimer.Elapsed += TokenTimer_Tick;
|
||||
tokenTimer.Start();
|
||||
|
||||
AppMetaData.user = Username;
|
||||
return (true, null);
|
||||
}
|
||||
catch (FirebaseAuthException Ex)
|
||||
|
||||
@@ -7,6 +7,9 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using GraphQL.Client.Http;
|
||||
using GraphQL.Client.Serializer.Newtonsoft;
|
||||
using System.Net.Http;
|
||||
using Newtonsoft;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace BodyshopPartner.Utils
|
||||
{
|
||||
@@ -28,7 +31,30 @@ namespace BodyshopPartner.Utils
|
||||
{
|
||||
logger.Trace("Firing a GQL Query!");
|
||||
logger.Trace("Firing GQL Query: {0} {1}", r.Query.ToString(), r.Variables);
|
||||
|
||||
//var content = new content("grant_type=password&username=username&password=password");
|
||||
//content.Headers.Add("Content-Type", "application/json");
|
||||
dynamic postData = new JObject();
|
||||
postData.imexshopid = AppMetaData.ActiveShopName;
|
||||
postData.operationName = r.Query.ToString();
|
||||
postData.dbevent = true;
|
||||
postData.user = AppMetaData.user;
|
||||
postData.source = "Partner";
|
||||
var httpClient = new HttpClient();
|
||||
var content = new StringContent(postData.ToString(), Encoding.UTF8, "application/json");
|
||||
|
||||
try
|
||||
{
|
||||
httpClient.PostAsync("https://api.imex.online/ioevent", content);
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Error(ex,"Unable to post to IOEVENT.");
|
||||
}
|
||||
|
||||
var graphQLResponse = await g.SendQueryAsync<dynamic>(r);
|
||||
|
||||
if (graphQLResponse.Errors == null)
|
||||
{
|
||||
|
||||
|
||||
@@ -304,6 +304,7 @@ namespace BodyshopPartner.ViewModels
|
||||
|
||||
ActiveShop = ShopData.Where(_ => _.AssociationActive == true).FirstOrDefault();
|
||||
Utils.AppMetaData.ActiveShopId = ActiveShop?.Id;
|
||||
Utils.AppMetaData.ActiveShopName = ActiveShop?.ShopName;
|
||||
Utils.AppMetaData.ShopRegion = ActiveShop?.RegionConfig;
|
||||
Properties.Settings.Default.LastSelectedShop = ActiveShop.Id ?? null;
|
||||
Properties.Settings.Default.Save();
|
||||
|
||||
Reference in New Issue
Block a user