Added http exception to test command for testing.
This commit is contained in:
@@ -21,6 +21,7 @@ namespace BodyshopPartner.Utils
|
|||||||
{
|
{
|
||||||
Route.Add("/qb/", (req, res, props) =>
|
Route.Add("/qb/", (req, res, props) =>
|
||||||
{
|
{
|
||||||
|
hlog("Received a ping from ImEX.online");
|
||||||
res.WithCORS();
|
res.WithCORS();
|
||||||
//res.AddHeader("Access-Control-Allow-Origin", "http://localhost:3000 https://localhost:3000 http://localhost:5000 https://localhost:5000 https://*.imex.online,imex.online");
|
//res.AddHeader("Access-Control-Allow-Origin", "http://localhost:3000 https://localhost:3000 http://localhost:5000 https://localhost:5000 https://*.imex.online,imex.online");
|
||||||
res.Close();
|
res.Close();
|
||||||
|
|||||||
@@ -20,16 +20,32 @@ namespace BodyshopPartner.Utils
|
|||||||
onInitialInstall: v =>
|
onInitialInstall: v =>
|
||||||
{
|
{
|
||||||
logger.Debug("Installing via Squirrel Aware Helper. ", v);
|
logger.Debug("Installing via Squirrel Aware Helper. ", v);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
logger.Debug("Attempting to add HTTP Exclusion for web-server");
|
||||||
|
System.Diagnostics.Process process = new System.Diagnostics.Process();
|
||||||
|
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
|
||||||
|
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
|
||||||
|
startInfo.FileName = "cmd.exe";
|
||||||
|
startInfo.Arguments = "add netsh http add urlacl url=http://+:1337/ user=\"Everyone\"";
|
||||||
|
startInfo.Verb = "runas";
|
||||||
|
process.StartInfo = startInfo;
|
||||||
|
bool successful = process.Start();
|
||||||
|
|
||||||
logger.Debug("Attempting to add HTTP Exclusion for web-server");
|
if (successful)
|
||||||
System.Diagnostics.Process process = new System.Diagnostics.Process();
|
{
|
||||||
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
|
logger.Debug("Successfully added exception.");
|
||||||
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
|
}
|
||||||
startInfo.FileName = "cmd.exe";
|
else
|
||||||
startInfo.Arguments = "add netsh http add urlacl url=http://+:1337/ user=\"Everyone\"";
|
{
|
||||||
startInfo.Verb = "runas";
|
logger.Fatal("Unable to set exception for http port");
|
||||||
process.StartInfo = startInfo;
|
}
|
||||||
process.Start();
|
|
||||||
|
}
|
||||||
|
catch (Exception Ex)
|
||||||
|
{
|
||||||
|
logger.Fatal("Unable to set exception for http port", Ex.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
mgr.CreateShortcutForThisExe();
|
mgr.CreateShortcutForThisExe();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -255,51 +255,33 @@ namespace BodyshopPartner.ViewModels
|
|||||||
public async Task TestGql()
|
public async Task TestGql()
|
||||||
{
|
{
|
||||||
|
|
||||||
Utils.Notifications.notifier.ShowInformation("The message");
|
try
|
||||||
|
{
|
||||||
|
logger.Debug("Attempting to add HTTP Exclusion for web-server");
|
||||||
|
System.Diagnostics.Process process = new System.Diagnostics.Process();
|
||||||
|
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
|
||||||
|
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
|
||||||
|
startInfo.FileName = "cmd.exe";
|
||||||
|
startInfo.Arguments = "add netsh http add urlacl url=http://+:1337/ user=\"Everyone\"";
|
||||||
|
startInfo.Verb = "runas";
|
||||||
|
process.StartInfo = startInfo;
|
||||||
|
bool successful = process.Start();
|
||||||
|
if (successful)
|
||||||
|
{
|
||||||
|
logger.Debug("Successfully added exception.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
logger.Fatal("Unable to set exception for http port");
|
||||||
|
AddHttpStatus("Unable to add exception for the port! Please run as an administrator.");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//Notification _n = new Notification()
|
}
|
||||||
//{
|
catch (Exception Ex)
|
||||||
// Id = new Random().Next(),
|
{
|
||||||
// Title = "This is a title",
|
logger.Fatal("Unable to set exception for http port", Ex.ToString());
|
||||||
// Subtitle = "Subtitle",
|
}
|
||||||
// Message = "Somethin"
|
|
||||||
//};
|
|
||||||
//Growler.AddNotification(_n);
|
|
||||||
|
|
||||||
Console.WriteLine(al.FirebaseToken);
|
|
||||||
FirebaseAuthLink t = await al.GetFreshAuthAsync();
|
|
||||||
Console.WriteLine(t.FirebaseToken);
|
|
||||||
AddHttpStatus(t.FirebaseToken);
|
|
||||||
//var r = new GraphQLRequest
|
|
||||||
//{
|
|
||||||
// Query = @"query MyQuery($key: String!) {
|
|
||||||
// masterdata(where: {key: {_eq: $key}}) {
|
|
||||||
// value
|
|
||||||
// key
|
|
||||||
// }
|
|
||||||
// }",
|
|
||||||
// Variables = new
|
|
||||||
// {
|
|
||||||
// key = Utils.AppMetaData.ShopRegion + "_ciecaopcodes"
|
|
||||||
// }
|
|
||||||
//};
|
|
||||||
//var data = await Utils.GraphQL.ExecuteQuery(r);
|
|
||||||
|
|
||||||
////var t = Newtonsoft.Json.JsonConvert.DeserializeObject<List<dynamic>>(data.masterdata[0].value.Value);
|
|
||||||
//Utils.AppMetaData.CiecaOpCodes = JObject.Parse(data.masterdata[0].value.Value);
|
|
||||||
|
|
||||||
//try
|
|
||||||
//{
|
|
||||||
// var aa = Utils.AppMetaData.CiecaOpCodes.Property("OP1").Children();
|
|
||||||
// var cc = Utils.AppMetaData.CiecaOpCodes["OP1"]["desc"].Value;
|
|
||||||
// var ab = Utils.AppMetaData.CiecaOpCodes.Property("OP1.desc");
|
|
||||||
|
|
||||||
//}
|
|
||||||
//catch (Exception EX)
|
|
||||||
//{
|
|
||||||
// logger.Warn("Err");
|
|
||||||
//}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user