Create ability to launch connecting to use using 'test' launch param
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace BodyshopPartner.Utils
|
||||
{
|
||||
@@ -12,14 +13,52 @@ namespace BodyshopPartner.Utils
|
||||
public static string ActiveShopId = Properties.Settings.Default.LastSelectedShop;
|
||||
public static string ShopRegion = "";
|
||||
public static dynamic CiecaOpCodes;
|
||||
private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
|
||||
public static string graphQlEndpoint;
|
||||
public static string FirebaseAPIKey;
|
||||
public static Boolean IsTest = false;
|
||||
public static void CreateEndpoints()
|
||||
{
|
||||
logger.Debug("Creating endpoints for graphql.");
|
||||
string[] args = Environment.GetCommandLineArgs();
|
||||
if (args.Length == 1)
|
||||
{
|
||||
#if DEBUG
|
||||
graphQlEndpoint = "https://bodyshop-dev-db.herokuapp.com/v1/graphql";
|
||||
FirebaseAPIKey = "AIzaSyDPLT8GiDHDR1R4nI66Qi0BY1aYviDPioc";
|
||||
|
||||
#if DEBUG
|
||||
public static string graphQlEndpoint = "https://bodyshop-dev-db.herokuapp.com/v1/graphql";
|
||||
public static string FirebaseAPIKey = "AIzaSyDPLT8GiDHDR1R4nI66Qi0BY1aYviDPioc";
|
||||
#elif TEST
|
||||
graphQlEndpoint = "https://db.test.bodyshop.app/v1/graphql";
|
||||
FirebaseAPIKey = "AIzaSyBw7_GTy7GtQyfkIRPVrWHEGKfcqeyXw0c";
|
||||
|
||||
#else
|
||||
public static string graphQlEndpoint = "https://db.imex.online/v1/graphql";
|
||||
public static string FirebaseAPIKey = "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU";
|
||||
graphQlEndpoint = "https://db.imex.online/v1/graphql";
|
||||
FirebaseAPIKey = "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU";
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
if (args[1] == "test")
|
||||
{
|
||||
IsTest = true;
|
||||
|
||||
graphQlEndpoint = "https://db.test.bodyshop.app/v1/graphql";
|
||||
FirebaseAPIKey = "AIzaSyBw7_GTy7GtQyfkIRPVrWHEGKfcqeyXw0c";
|
||||
}
|
||||
else
|
||||
{
|
||||
#if DEBUG
|
||||
graphQlEndpoint = "https://bodyshop-dev-db.herokuapp.com/v1/graphql";
|
||||
FirebaseAPIKey = "AIzaSyDPLT8GiDHDR1R4nI66Qi0BY1aYviDPioc";
|
||||
#else
|
||||
graphQlEndpoint = "https://db.imex.online/v1/graphql";
|
||||
FirebaseAPIKey = "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU";
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user