From dbd323aeca4e8f25eb820cb26e5b463d4ffc972c Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 21 Jun 2022 00:08:36 +0000 Subject: [PATCH] --- AyaNovaQBI/auth.cs | 4 ++++ AyaNovaQBI/util.cs | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/AyaNovaQBI/auth.cs b/AyaNovaQBI/auth.cs index 39507a5..40486f7 100644 --- a/AyaNovaQBI/auth.cs +++ b/AyaNovaQBI/auth.cs @@ -20,6 +20,10 @@ namespace AyaNovaQBI private void auth_Load(object sender, EventArgs e) { edServerUrl.Text = Properties.Settings.Default.serverurl; +#if (DEBUG) + edUserName.Text = "qbi"; + edPassword.Text = "qbi"; +#endif } private async void btnTest_Click(object sender, EventArgs e) diff --git a/AyaNovaQBI/util.cs b/AyaNovaQBI/util.cs index 3285289..c0ae4e0 100644 --- a/AyaNovaQBI/util.cs +++ b/AyaNovaQBI/util.cs @@ -87,7 +87,7 @@ namespace AyaNovaQBI creds.password = password; var requestMessage = new HttpRequestMessage(HttpMethod.Post, ApiBaseUrl + "auth"); requestMessage.Content = new StringContent(creds.ToString(), System.Text.Encoding.UTF8, "application/json"); - HttpResponseMessage response = null; + HttpResponseMessage response; try { response = await client.SendAsync(requestMessage); @@ -460,6 +460,9 @@ namespace AyaNovaQBI return false; //Fetch AyaNova license + var r=await GetAsync("license"); + todo: need to be able to check via route if has licensefeature, code is already in license biz object, just need exposed to route for logged in users only under license/has-feature + //Check if licensed //check if build date is within licensed date (how did I do that automated build date thing?) // copy timestamp.cs and the createtimestamp.exe utility from v7 qbi and create build event to run it here and do same thing