Updated NavdataModel and RouteController to user environment Variables
This commit is contained in:
parent
30ac25c8fb
commit
39c18ee9bf
@ -132,7 +132,8 @@ namespace EFB.Controllers
|
||||
headerData.Add("referer", "luke-else.co.uk");
|
||||
|
||||
Dictionary<string, string> formData = new Dictionary<string, string>();
|
||||
formData.Add("token", "");
|
||||
|
||||
formData.Add("token", Environment.GetEnvironmentVariable("ChartFoxAPIKey", EnvironmentVariableTarget.User));
|
||||
var body = new FormUrlEncodedContent(formData);
|
||||
|
||||
//make Charts request
|
||||
|
@ -39,7 +39,8 @@ namespace EFB.Models
|
||||
}
|
||||
|
||||
public static async Task<NavdataModel[]> Populate(){
|
||||
MySqlConnection con = new MySqlConnection("server=server.luke-else.co.uk;userid=root;password=;database=EFB");
|
||||
string password = Environment.GetEnvironmentVariable("MySQLPassword", EnvironmentVariableTarget.User);
|
||||
MySqlConnection con = new MySqlConnection($"server=server.luke-else.co.uk;userid=root;password={password};database=EFB");
|
||||
con.Open();
|
||||
|
||||
// Console.WriteLine($"MySQL version : {con.ServerVersion}");
|
||||
|
Loading…
Reference in New Issue
Block a user