diff --git a/BodyshopUploader/App.config b/BodyshopUploader/App.config index 67533ed..6cdd7de 100644 --- a/BodyshopUploader/App.config +++ b/BodyshopUploader/App.config @@ -1,62 +1,62 @@ - + -
+
- + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + False - + True - + - \ No newline at end of file + diff --git a/BodyshopUploader/Assets/logo1024.png b/BodyshopUploader/Assets/logo1024.png index ad76341..29354e7 100644 Binary files a/BodyshopUploader/Assets/logo1024.png and b/BodyshopUploader/Assets/logo1024.png differ diff --git a/BodyshopUploader/BodyshopPartner.csproj b/BodyshopUploader/BodyshopPartner.csproj index 2cf5fd5..d8c0680 100644 --- a/BodyshopUploader/BodyshopPartner.csproj +++ b/BodyshopUploader/BodyshopPartner.csproj @@ -8,8 +8,8 @@ {76B98E9B-A33A-464F-A07B-56E773376543} WinExe BodyshopPartner - BodyshopPartner - v4.7.2 + ImEX Online Partner + v4.8 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 @@ -32,6 +32,7 @@ true + AnyCPU @@ -77,6 +78,7 @@ MinimumRecommendedRules.ruleset true + ..\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.dll diff --git a/BodyshopUploader/Properties/Settings.Designer.cs b/BodyshopUploader/Properties/Settings.Designer.cs index 5ac176e..ec865ae 100644 --- a/BodyshopUploader/Properties/Settings.Designer.cs +++ b/BodyshopUploader/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace BodyshopPartner.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.7.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/BodyshopUploader/Utils/AppMetaData.cs b/BodyshopUploader/Utils/AppMetaData.cs index 6bd78c4..19f5a44 100644 --- a/BodyshopUploader/Utils/AppMetaData.cs +++ b/BodyshopUploader/Utils/AppMetaData.cs @@ -9,9 +9,17 @@ namespace BodyshopPartner.Utils public static class AppMetaData { //TODO: Change firebase API Key to be dependent on what environment monitor has been set for. - public static string FirebaseAPIKey_DEV = "AIzaSyDPLT8GiDHDR1R4nI66Qi0BY1aYviDPioc"; public static string ActiveShopId = Properties.Settings.Default.LastSelectedShop; public static string ShopRegion = ""; public static dynamic CiecaOpCodes; + +#if DEBUG + public static string graphQlEndpoint = "https://bodyshop-dev-db.herokuapp.com/v1/graphql"; + public static string FirebaseAPIKey = "AIzaSyDPLT8GiDHDR1R4nI66Qi0BY1aYviDPioc"; + +#else + public static string graphQlEndpoint = "https://db.imex.online/v1/graphql"; + public static string FirebaseAPIKey = "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU"; +#endif } } diff --git a/BodyshopUploader/Utils/Auth.cs b/BodyshopUploader/Utils/Auth.cs index 8898798..a8bfb72 100644 --- a/BodyshopUploader/Utils/Auth.cs +++ b/BodyshopUploader/Utils/Auth.cs @@ -12,7 +12,7 @@ namespace BodyshopPartner.Utils { private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger(); public static FirebaseAuthLink authlink; - static FirebaseAuthProvider ap = new FirebaseAuthProvider(new FirebaseConfig(Utils.AppMetaData.FirebaseAPIKey_DEV)); //TODO: Update this to be a dynamic key. Perhaps a function that fetches? + static FirebaseAuthProvider ap = new FirebaseAuthProvider(new FirebaseConfig(Utils.AppMetaData.FirebaseAPIKey)); private static Timer tokenTimer = new Timer(); private static string U; private static string P; diff --git a/BodyshopUploader/Utils/GraphQL.cs b/BodyshopUploader/Utils/GraphQL.cs index 618d8c7..4bf1f9a 100644 --- a/BodyshopUploader/Utils/GraphQL.cs +++ b/BodyshopUploader/Utils/GraphQL.cs @@ -16,7 +16,7 @@ namespace BodyshopPartner.Utils public static GraphQLHttpClient CreateGQLClient() { - var graphQLClient = new GraphQLHttpClient("https://bodyshop-dev-db.herokuapp.com/v1/graphql", new NewtonsoftJsonSerializer()); + var graphQLClient = new GraphQLHttpClient(AppMetaData.graphQlEndpoint, new NewtonsoftJsonSerializer()); graphQLClient.HttpClient.DefaultRequestHeaders.Add("Authorization", "Bearer " + Utils.Auth.authlink.FirebaseToken); return graphQLClient;